Skip to content

Commit

Permalink
fix(template): Double properties cause template engine crash (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf authored Nov 19, 2021
1 parent 55014f3 commit 700c276
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Features/properties_templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export async function initPropertiesTemplates(): Promise<void> {
for (const [layerName, layer] of layers.entries()) {
const properties = layer.properties ?? [];
for (const property of properties) {
if (property.type === "int" || property.type === "bool" || property.type === "object") {
if (
property.type === "int" ||
property.type === "bool" ||
property.type === "object" ||
typeof property.value !== "string"
) {
continue;
}
const template = new TemplateValue(property.value, WA.state);
Expand Down

0 comments on commit 700c276

Please sign in to comment.