Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript if (j === null) do nothing

I'm using CurvyCorners to make my corners curvy in IE, only thing is that when it reads the CSS it takes all the webkit properties and shows me an alert curvyCorners.alert("No object with ID " + arg + " exists yet.\nCall curvyCorners(settings, obj) when it is created.");.

How can I just set this if statement to do nothing?

if (j === null)
  do nothing(); //but in real script

Thanks :)

like image 465
Kyle Avatar asked May 03 '10 08:05

Kyle


1 Answers

Do you have access to the code? If so, you can add this code to the start of the curvyCorners function definition:

if (!obj) return;

This will quit the curvyCorners function silently if the element doesn't exist.

like image 136
Delan Azabani Avatar answered Oct 13 '22 09:10

Delan Azabani