I have this code below in a panel-plugin which works only if the myfile.txt exists and returns “true”, but if the file doesn’t exist then all the code after gets frozen and I am not getting a “false” in the console log
I guess it’s because the “isFile” is a property of an Entry, when there is no entry (in this case the file), then it probably gets upset that you want to reference the property “isFile” of undefined.
You could, however, make some sort of helper function like this :