Hello, while reading how tools are made in CT, I noticed that the method "canApply" in the Paragraph tool could possibly throw an error if the element is undefined.
That's because the "element" variable is used before being tested if defined, so the call to "element.isFixed()" will throw an error if "element" is undefined.
You should write instead :
return element != undefined and not element.isFixed();
Hello, while reading how tools are made in CT, I noticed that the method "canApply" in the Paragraph tool could possibly throw an error if the element is undefined.
That's because the "element" variable is used before being tested if defined, so the call to "element.isFixed()" will throw an error if "element" is undefined.
You should write instead :