瀏覽代碼

make_model: reset promise on rejection

master
Bing Sun 5 年之前
父節點
當前提交
fd25610b83
簽署人: sunb GPG Key ID: F7795F8C590626AB
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      src/util/make_model.js

+ 6
- 1
src/util/make_model.js 查看文件

@@ -162,11 +162,13 @@ export default (options={}) => {
console.warn('The response range is narrower than requested, probably due to an upstream hard limit.')

// clean model state
_promise = null
this.reset()

// return data
return _cache.data.slice(_begin, _end + 1)
}).finally(() => {
// clean model state
_promise = null
})

return _promise
@@ -205,6 +207,9 @@ export default (options={}) => {
// clean state
_promise = null
this.reset()
}).finally(() => {
// clean state
_promise = null
})

return _promise


Loading…
取消
儲存