Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/westberliner/checksum.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick <patrick@westberliner.net>2017-01-11 13:29:11 +0300
committerPatrick <patrick@westberliner.net>2017-01-11 13:29:11 +0300
commit3a101072a09c491a384a0e48d09e924b67b1ea0a (patch)
tree8316116822f28f442f1516a478491fc0cd11652f
parent58080ba7aa61111161ad4c08d1b5b8b5015d2a3e (diff)
refs #3 - skip check if fileinfo is null.
-rw-r--r--js/checksum.tabview.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/checksum.tabview.js b/js/checksum.tabview.js
index 4c349df..d84a093 100644
--- a/js/checksum.tabview.js
+++ b/js/checksum.tabview.js
@@ -48,6 +48,15 @@
* ajax callback for generating md5 hash
*/
check: function(fileInfo) {
+ // skip call if fileInfo is null
+ if(null == fileInfo) {
+ _self.updateDisplay({
+ response: 'error',
+ msg: t('checksum', 'No fileinfo provided.')
+ });
+
+ return;
+ }
var url = OC.generateUrl('/apps/checksum/check'),
data = {source: fileInfo.getFullPath()},