node-forge 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/log.js CHANGED
@@ -286,7 +286,7 @@ if(typeof(console) !== 'undefined' && 'log' in console) {
286
286
  }
287
287
 
288
288
  /*
289
- * Check for logging control query vars.
289
+ * Check for logging control query vars in current URL.
290
290
  *
291
291
  * console.level=<level-name>
292
292
  * Set's the console log level by name. Useful to override defaults and
@@ -297,13 +297,10 @@ if(typeof(console) !== 'undefined' && 'log' in console) {
297
297
  * after console.level is processed. Useful to force a level of verbosity
298
298
  * that could otherwise be limited by a user config.
299
299
  */
300
- if(sConsoleLogger !== null) {
301
- var query;
302
- if(typeof window !== 'undefined' && window.location) {
303
- query = new URL(window.location.href).searchParams;
304
- } else {
305
- query = new URLSearchParams();
306
- }
300
+ if(sConsoleLogger !== null &&
301
+ typeof window !== 'undefined' && window.location
302
+ ) {
303
+ var query = new URL(window.location.href).searchParams;
307
304
  if(query.has('console.level')) {
308
305
  // set with last value
309
306
  forge.log.setLevel(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-forge",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.",
5
5
  "homepage": "https://github.com/digitalbazaar/forge",
6
6
  "author": {