From 4221db4850905c535a9197ae4369012ef9fd1575 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 8 Apr 2019 19:38:40 +0200 Subject: Fix Storage.js throwing exception unless loaded as a module. --- common/Storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') 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'); } -- cgit v1.2.3