Skip to content

Commit f76e104

Browse files
committed
Merge pull request adamwulf#117 from borkweb/prevent-undefined-error
Prevent an undefined object error when $cloneMe.get(0) is undefined
2 parents d688263 + f21114e commit f76e104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.columnizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
var $cloneMe = $pullOutHere.contents(":first");
226226
//
227227
// make sure we're splitting an element
228-
if($cloneMe.get(0).nodeType != 1) return;
228+
if( typeof $cloneMe.get(0) == 'undefined' || $cloneMe.get(0).nodeType != 1 ) return;
229229

230230
//
231231
// clone the node with all data and events

0 commit comments

Comments
 (0)