ソースを参照

make_model: reset promise on rejection

master
Bing Sun 5年前
コミット
fd25610b83
署名者: sunb GPGキー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.') console.warn('The response range is narrower than requested, probably due to an upstream hard limit.')


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


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


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


return _promise return _promise


読み込み中…
キャンセル
保存