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