Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f637c44

Browse filesBrowse files
committed
Fixed environment detection in web worker.
1 parent c20a2c8 commit f637c44
Copy full SHA for f637c44

File tree

Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ Questions, comments, bug reports, and pull requests are all welcome.
237237

238238
## Changelog
239239

240+
### 0.3.1
241+
* Fixed environment detection in web worker.
242+
240243
### 0.3.0
241244
* Added import/export from/to raw key components.
242245
* Removed lodash from dependencies.

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-rsa",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "Node.js RSA library",
55
"main": "src/NodeRSA.js",
66
"scripts": {

‎src/formats/components.js

Copy file name to clipboardExpand all lines: src/formats/components.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
dmp1: key.dmp1.toBuffer(),
1313
dmq1: key.dmq1.toBuffer(),
1414
coeff: key.coeff.toBuffer()
15-
}
15+
};
1616
},
1717

1818
privateImport: function (key, data, options) {
@@ -36,7 +36,7 @@ module.exports = {
3636
return {
3737
n: key.n.toBuffer(),
3838
e: key.e
39-
}
39+
};
4040
},
4141

4242
publicImport: function (key, data, options) {

‎src/utils.js

Copy file name to clipboardExpand all lines: src/utils.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports.linebrk = function (str, maxLen) {
2424
module.exports.detectEnvironment = function () {
2525
if (process && process.title != 'browser') {
2626
return 'node';
27-
} else if (window) {
27+
} else if (typeof(window) !== 'undefined' && window) {
2828
return 'browser';
2929
}
3030
return 'node';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.