@denevads/dnv-smo 1.0.25 → 1.0.26

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.
Files changed (3) hide show
  1. package/dist/smo.js +25 -18
  2. package/package.json +1 -1
  3. package/src/smo.ts +25 -17
package/dist/smo.js CHANGED
@@ -103,26 +103,33 @@ var SMO = /** @class */ (function () {
103
103
  CheckHealth: window.objJS.checkHealth
104
104
  };
105
105
  }
106
- if (this.vars.idSmo) {
107
- this.id = this.vars.idSmo;
108
- if (this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)) {
109
- this.smoCallBacks.onSmoLoad();
110
- return;
111
- }
112
- if (this.vars["url"] != undefined) {
113
- this.smoCallBacks.getFile(this.vars["url"]);
114
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
115
- _this.smoCallBacks.getFile(_this.vars["url"]);
116
- });
117
- return;
118
- }
119
- if (this.vars["LocalData"] != undefined) {
120
- this.smoCallBacks.getLocalData(this.vars["LocalData"]);
121
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
122
- _this.smoCallBacks.getLocalData(_this.vars["LocalData"]);
123
- });
106
+ else {
107
+ if (this.vars.idSmo) {
108
+ this.id = this.vars.idSmo;
109
+ if (this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)) {
110
+ this.smoCallBacks.onSmoLoad();
111
+ return;
112
+ }
113
+ if (this.vars["url"] != undefined) {
114
+ this.smoCallBacks.getFile(this.vars["url"]);
115
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
116
+ _this.smoCallBacks.getFile(_this.vars["url"]);
117
+ });
118
+ return;
119
+ }
120
+ if (this.vars["LocalData"] != undefined) {
121
+ this.smoCallBacks.getLocalData(this.vars["LocalData"]);
122
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
123
+ _this.smoCallBacks.getLocalData(_this.vars["LocalData"]);
124
+ });
125
+ return;
126
+ }
124
127
  return;
125
128
  }
129
+ console.warn("No idSmo found in URL");
130
+ }
131
+ if (this.vars.idSmo) {
132
+ this.id = this.vars.idSmo;
126
133
  return;
127
134
  }
128
135
  console.warn("No idSmo found in URL");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -128,30 +128,38 @@ export class SMO {
128
128
  // @ts-ignore
129
129
  CheckHealth: window.objJS.checkHealth
130
130
  };
131
- }
132
- if (this.vars.idSmo) {
133
- this.id = this.vars.idSmo;
134
- if(this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)){
135
- this.smoCallBacks.onSmoLoad();
136
- return;
137
- }
138
- if(this.vars["url"] != undefined ){
139
- this.smoCallBacks.getFile(this.vars["url"]);
140
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
131
+ }else{
132
+ if (this.vars.idSmo) {
133
+ this.id = this.vars.idSmo;
134
+ if(this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)){
135
+ this.smoCallBacks.onSmoLoad();
136
+ return;
137
+ }
138
+ if(this.vars["url"] != undefined ){
141
139
  this.smoCallBacks.getFile(this.vars["url"]);
142
- });
143
- return;
144
- }
145
- if(this.vars["LocalData"] != undefined ){
146
- this.smoCallBacks.getLocalData(this.vars["LocalData"]);
147
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
140
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
141
+ this.smoCallBacks.getFile(this.vars["url"]);
142
+ });
143
+ return;
144
+ }
145
+ if(this.vars["LocalData"] != undefined ){
148
146
  this.smoCallBacks.getLocalData(this.vars["LocalData"]);
149
- });
147
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
148
+ this.smoCallBacks.getLocalData(this.vars["LocalData"]);
149
+ });
150
+ return;
151
+ }
150
152
  return;
151
153
  }
154
+ console.warn("No idSmo found in URL");
155
+ }
156
+
157
+ if (this.vars.idSmo) {
158
+ this.id = this.vars.idSmo;
152
159
  return;
153
160
  }
154
161
  console.warn("No idSmo found in URL");
162
+
155
163
  }
156
164
  initOnMessage():void{
157
165
  let selft = this;