web-manager 3.2.58 → 3.2.59

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -470,7 +470,8 @@ Manager.prototype.init = function(configuration, callback) {
470
470
  // Load polyfills
471
471
  init_loadPolyfills(self, configuration, function() {
472
472
  self.properties.page.status.initializing = false;
473
- // self.properties.genericPromise = new Promise(resolve => { resolve() });
473
+
474
+ // set options
474
475
  var options_defaults = {
475
476
  // debug: {
476
477
  // environment: self.properties.meta.environment,
package/lib/account.js CHANGED
@@ -7,17 +7,26 @@ function Account(init) {
7
7
  self.properties = {};
8
8
  self.accountPageInitialized = false;
9
9
 
10
+ // Initialize libraries
10
11
  try {
11
12
  self.dom = init.dom || self.Manager.dom();
12
13
  self.utilities = init.utilities || self.Manager.utilities();
14
+ } catch (e) {
15
+ console.error('Failed to initialize libraries');
16
+ }
13
17
 
14
- var url = new URL(window.location.href);
18
+ // Initialize account page
19
+ try {
20
+ // If we're NOT in the browser, skip
21
+ if (typeof window !== 'undefined') {
22
+ var url = new URL(window.location.href);
15
23
 
16
- if (url.pathname.startsWith('/account')) {
17
- self.initializeAccountPage();
24
+ if (url.pathname.startsWith('/account')) {
25
+ self.initializeAccountPage();
26
+ }
18
27
  }
19
28
  } catch (e) {
20
- console.error('Failed to initialize libraries');
29
+ console.error('Failed to initialize account page');
21
30
  }
22
31
  }
23
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.58",
3
+ "version": "3.2.59",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {