]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check for callback in OC.dialogs.alert.
authorThomas Tanghus <thomas@tanghus.net>
Thu, 3 May 2012 14:30:24 +0000 (16:30 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Thu, 3 May 2012 22:13:35 +0000 (00:13 +0200)
core/js/oc-dialogs.js

index f6870e62710040493daeebca937be9fc71c3ddd9..4240b75c6f8515c23ea8e977682c0feabcf514d9 100644 (file)
@@ -153,7 +153,7 @@ OCdialogs = {
         var f;
         switch(dialog_type) {
           case OCdialogs.ALERT_DIALOG:
-            f = function(){$(c_id).dialog('close'); callback();};
+            f = function(){$(c_id).dialog('close'); if(callback) callback();};
           break;
           case OCdialogs.PROMPT_DIALOG:
             f = function(){OCdialogs.prompt_ok_handler(callback, c_id)};