Skip to content

Commit

Permalink
Add support for exports. cryptpad#1
Browse files Browse the repository at this point in the history
  • Loading branch information
chmac committed May 17, 2019
1 parent 70a95d6 commit 7d55ec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,10 @@ Use-cases...
return Crypto;
};

if (typeof(module) !== 'undefined' && module.exports) {
if (typeof(exports) !== 'undefined') {
exports = factory(require('tweetnacl'));
}
else if (typeof(module) !== 'undefined' && module.exports) {
module.exports = factory(require('tweetnacl'));
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
Expand Down

0 comments on commit 7d55ec7

Please sign in to comment.