@nxtedition/lib 17.1.1 → 17.2.0
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/package.json +1 -1
- package/util/template/javascript.js +15 -3
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@ class FetchEntry {
|
|
|
60
60
|
this.headers = res.headers
|
|
61
61
|
this.body = await res.text()
|
|
62
62
|
} catch (err) {
|
|
63
|
-
this.error = err
|
|
63
|
+
this.error = Object.assign(err, { data: resource })
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
if (this.refresh) {
|
|
@@ -68,14 +68,14 @@ class FetchEntry {
|
|
|
68
68
|
}
|
|
69
69
|
})
|
|
70
70
|
.catch((err) => {
|
|
71
|
-
this.error = err
|
|
71
|
+
this.error = Object.assign(err, { data: resource })
|
|
72
72
|
|
|
73
73
|
if (this.refresh) {
|
|
74
74
|
this.refresh()
|
|
75
75
|
}
|
|
76
76
|
})
|
|
77
77
|
} catch (err) {
|
|
78
|
-
this.error = err
|
|
78
|
+
this.error = Object.assign(err, { data: resource })
|
|
79
79
|
this.refresh()
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -416,6 +416,10 @@ export default function ({ ds, proxify, compiler }) {
|
|
|
416
416
|
const key = JSON.stringify({ resource, options })
|
|
417
417
|
const entry = this._getEntry(key, FetchEntry, { resource, options })
|
|
418
418
|
|
|
419
|
+
if (entry.refresh === null) {
|
|
420
|
+
return null
|
|
421
|
+
}
|
|
422
|
+
|
|
419
423
|
if (entry.error) {
|
|
420
424
|
throw entry.error
|
|
421
425
|
}
|
|
@@ -438,6 +442,10 @@ export default function ({ ds, proxify, compiler }) {
|
|
|
438
442
|
|
|
439
443
|
const entry = this._getEntry(observable, ObservableEntry, observable)
|
|
440
444
|
|
|
445
|
+
if (entry.refresh === null) {
|
|
446
|
+
return null
|
|
447
|
+
}
|
|
448
|
+
|
|
441
449
|
if (entry.error) {
|
|
442
450
|
throw entry.error
|
|
443
451
|
}
|
|
@@ -460,6 +468,10 @@ export default function ({ ds, proxify, compiler }) {
|
|
|
460
468
|
|
|
461
469
|
const entry = this._getEntry(promise, PromiseEntry, promise)
|
|
462
470
|
|
|
471
|
+
if (entry.refresh === null) {
|
|
472
|
+
return null
|
|
473
|
+
}
|
|
474
|
+
|
|
463
475
|
if (entry.error) {
|
|
464
476
|
throw entry.error
|
|
465
477
|
}
|