diff options
author | Patrick <patrick@westberliner.net> | 2017-01-11 13:29:11 +0300 |
---|---|---|
committer | Patrick <patrick@westberliner.net> | 2017-01-11 13:29:11 +0300 |
commit | 3a101072a09c491a384a0e48d09e924b67b1ea0a (patch) | |
tree | 8316116822f28f442f1516a478491fc0cd11652f | |
parent | 58080ba7aa61111161ad4c08d1b5b8b5015d2a3e (diff) |
refs #3 - skip check if fileinfo is null.
-rw-r--r-- | js/checksum.tabview.js | 9 |
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()}, |