Skip to content

Commit

Permalink
Merge pull request #624 from KaiVolland/fix-check-for-unsupported-pro…
Browse files Browse the repository at this point in the history
…perties

Fix `checkForUnsupportedProperties`
  • Loading branch information
KaiVolland authored Jun 9, 2022
2 parents 9e9285a + dad4e63 commit 3d58c3c
Show file tree
Hide file tree
Showing 2 changed files with 316 additions and 68 deletions.
12 changes: 6 additions & 6 deletions src/SldStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,20 +1329,20 @@ export class SldStyleParser implements StyleParser<string> {
const key = capitalizeFirstLetter(`${symbolizer.kind}Symbolizer`);
const value = this.unsupportedProperties?.Symbolizer?.[key];
if (value) {
if (!unsupportedProperties.Symbolizer) {
unsupportedProperties.Symbolizer = {};
}
if (typeof value === 'string' || value instanceof String ) {
if (!unsupportedProperties.Symbolizer) {
unsupportedProperties.Symbolizer = {};
}
unsupportedProperties.Symbolizer[key] = value;
} else {
if (!unsupportedProperties.Symbolizer[key]) {
unsupportedProperties.Symbolizer[key] = {};
}
Object.keys(symbolizer).forEach(property => {
if (value[property]) {
if (!unsupportedProperties.Symbolizer) {
unsupportedProperties.Symbolizer = {};
}
if (!unsupportedProperties.Symbolizer[key]) {
unsupportedProperties.Symbolizer[key] = {};
}
unsupportedProperties.Symbolizer[key][property] = value[property];
}
});
Expand Down
Loading

0 comments on commit 3d58c3c

Please sign in to comment.