Skip to content

Commit

Permalink
[application.js]: fixed 'data-ajax-confirm' extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed Jan 24, 2013
1 parent 563b4b9 commit 1e7928c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Resources/public/admin/js/application.js
Expand Up @@ -78,9 +78,11 @@ $(function () {
// Ajax
$.nette.ext('data-ajax-confirm', {
before: function (xhr, settings) {
var question = settings.nette.el.data('confirm');
if (question) {
return confirm(question);
if (settings.nette !== undefined && settings.nette.el !== undefined) {
var question = settings.nette.el.data('confirm');
if (question) {
return confirm(question);
}
}
}
});
Expand Down

0 comments on commit 1e7928c

Please sign in to comment.