Skip to content

Commit

Permalink
Re #1 - Make sure the instance has the user specified method before t…
Browse files Browse the repository at this point in the history
…rying to invoke it
  • Loading branch information
gfranko committed Aug 1, 2013
1 parent 152cd02 commit 16ed988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/jqfactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
existingInstance._init.apply(existingInstance, arguments);
if($.type(firstArg) === 'string') {
args.shift();
existingInstance[firstArg].apply(existingInstance, args);
if($.isFunction(existingInstance[firstArg])) {
existingInstance[firstArg].apply(existingInstance, args);
}
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/jqfactory.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16ed988

Please sign in to comment.