@live-change/dao 0.9.112 → 0.9.113

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.
@@ -44,7 +44,7 @@ class DaoPrerenderCache {
44
44
  }
45
45
  if(this.mode === 'save') {
46
46
  observable = new ObservableValue()
47
- this.get(what).then(value => {
47
+ Promise.resolve(this.get(what)).then(value => {
48
48
  if(value && typeof value === 'object') value[sourceSymbol] = what
49
49
  observable.set(value)
50
50
  }).catch(error => observable.error(error))
@@ -92,7 +92,7 @@ class DaoPrerenderCache {
92
92
 
93
93
  if(this.mode === 'save') {
94
94
  if(!promise) throw new Error("GET NOT FOUND: "+what)
95
- promise.then(result => {
95
+ Promise.resolve(promise).then(result => {
96
96
  let observable = this.observables.get(cacheKey)
97
97
  if(observable) {
98
98
  if(typeof observable == 'function') {
@@ -122,7 +122,7 @@ class DaoPrerenderCache {
122
122
  })
123
123
  }
124
124
 
125
- return promise.then(data => {
125
+ return Promise.resolve(promise).then(data => {
126
126
  if(data && typeof data === 'object') data[sourceSymbol] = what
127
127
  return data
128
128
  })
package/package.json CHANGED
@@ -35,6 +35,6 @@
35
35
  "scripts": {
36
36
  "test": "NODE_ENV=test tape tests/*"
37
37
  },
38
- "version": "0.9.112",
39
- "gitHead": "168448832a1c3b4fb17602293e3ed48425b697a9"
38
+ "version": "0.9.113",
39
+ "gitHead": "8bf5b441c3b006618e5d2c0cc9acc838b405ed3d"
40
40
  }