$ 0 0 You can wrap the code that removes the Layer Style in a try clause. try {// your code here;}catch (e) {};