@azrico/webobject 1.3.16 → 1.3.17
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.
|
@@ -168,7 +168,10 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
168
168
|
value: function getValue(key) {
|
|
169
169
|
var original = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
170
170
|
var thisobj = this.obj;
|
|
171
|
-
if (thisobj == null || typeof thisobj.getValue != "function")
|
|
171
|
+
if (thisobj == null || typeof thisobj.getValue != "function") {
|
|
172
|
+
console.error("cant use getValue when object is not defined. maybe you have to use New() ?");
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
172
175
|
return thisobj.getValue(key, original);
|
|
173
176
|
}
|
|
174
177
|
}, {
|
|
@@ -188,23 +191,24 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
188
191
|
case 0:
|
|
189
192
|
thisobj = this.obj;
|
|
190
193
|
if (!(thisobj == null || typeof thisobj.setValue != "function")) {
|
|
191
|
-
_context2.next =
|
|
194
|
+
_context2.next = 4;
|
|
192
195
|
break;
|
|
193
196
|
}
|
|
197
|
+
console.error("cant use setValue when object is not defined. maybe you have to use New() ?");
|
|
194
198
|
return _context2.abrupt("return", false);
|
|
195
|
-
case
|
|
196
|
-
_context2.next =
|
|
199
|
+
case 4:
|
|
200
|
+
_context2.next = 6;
|
|
197
201
|
return thisobj.setValue(key, value);
|
|
198
|
-
case
|
|
202
|
+
case 6:
|
|
199
203
|
_context2.t0 = _context2.sent;
|
|
200
204
|
if (_context2.t0) {
|
|
201
|
-
_context2.next =
|
|
205
|
+
_context2.next = 9;
|
|
202
206
|
break;
|
|
203
207
|
}
|
|
204
208
|
_context2.t0 = false;
|
|
205
|
-
case 8:
|
|
206
|
-
return _context2.abrupt("return", _context2.t0);
|
|
207
209
|
case 9:
|
|
210
|
+
return _context2.abrupt("return", _context2.t0);
|
|
211
|
+
case 10:
|
|
208
212
|
case "end":
|
|
209
213
|
return _context2.stop();
|
|
210
214
|
}
|