From 5995e7bc18794aca8ce142032ef115f030f5a6b4 Mon Sep 17 00:00:00 2001 From: wxnet2013 Date: Sun, 9 Sep 2018 06:04:00 +0800 Subject: [PATCH] fix: pass model name to createReducer --- src/rxloop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rxloop.js b/src/rxloop.js index 0c7495c..ef1985a 100644 --- a/src/rxloop.js +++ b/src/rxloop.js @@ -45,7 +45,7 @@ export function rxloop( config = {} ) { this._stream[name][`reducer_${type}$`] .pipe( map(action => { - return this.createReducer(action, reducers[type]); + return this.createReducer(action, reducers[type], name); }), ) // 将同步计算结果推送出去 @@ -103,7 +103,7 @@ export function rxloop( config = {} ) { model: name, epic: type, }); - return this.createReducer(action, reducers[reducer]); + return this.createReducer(action, reducers[reducer], name); }), catchError((error) => { option.onError({