fix type error
This commit is contained in:
parent
0fab1e3c04
commit
cad3fb2023
|
|
@ -162,15 +162,14 @@ to.${key} = ${value};`);
|
||||||
#evaluateExpression = (event?: Event) => {
|
#evaluateExpression = (event?: Event) => {
|
||||||
if (this.sourceElement === null || this.targetElement === null) return;
|
if (this.sourceElement === null || this.targetElement === null) return;
|
||||||
|
|
||||||
this.stroke = 'black';
|
|
||||||
|
|
||||||
if (!this.#function) return;
|
if (!this.#function) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.#function(this.sourceElement, this.targetElement, event);
|
this.#function(this.sourceElement, this.targetElement, event);
|
||||||
|
this.style.setProperty('--folk-rope-color', '');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('Failed to evaluate expression:', error);
|
console.warn('Failed to evaluate expression:', error);
|
||||||
this.stroke = 'red';
|
this.style.setProperty('--folk-rope-color', 'red');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue