aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2019-04-08 19:38:40 +0200
committerhackademix <giorgio@maone.net>2019-04-08 19:38:54 +0200
commit4221db4850905c535a9197ae4369012ef9fd1575 (patch)
tree334e8621bd98749fcf79dc74f7abe249717b818e
parenta99f7d91acf0fe82a8c82440c28ffc5fe379924a (diff)
Fix Storage.js throwing exception unless loaded as a module.
-rw-r--r--common/Storage.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/Storage.js b/common/Storage.js
index 8010f3f..62b7b19 100644
--- a/common/Storage.js
+++ b/common/Storage.js
@@ -133,7 +133,6 @@ class ListStore {
}
}
-var jssha = require('jssha');
function hash(source){
var shaObj = new jssha("SHA-256","TEXT")
shaObj.update(source);
@@ -142,4 +141,5 @@ function hash(source){
if (typeof module === "object") {
module.exports = { ListStore, Storage, hash };
+ var jssha = require('jssha');
}