import { put } from "redux-saga/effects";
import getArenaReducerDictEntry from "./getArenaReducerDictEntry";

const putSceneAction = function*(action, key = "_curScene") {
  let entry = yield* getArenaReducerDictEntry(key);
  let newAction = Object.assign({}, action, { _sceneReducerKey });
  yield put(action);
};

putSceneAction.resolve = function*(actionPromise, key = "_curScene") {
  let action = yield actionPromise;
  let entry = yield* getArenaReducerDictEntry(key);
  let newAction = Object.assign({}, action, { _sceneReducerKey });
  yield put(action);
};

export default putSceneAction;

@@ -254,32 +254,36 @@
 gn(%7B%7D, action, %7B
+%0A   
  _sceneReducerKe
@@ -275,32 +275,52 @@
 _sceneReducerKey
+: entry.reducerKey%0A 
  %7D);%0A  yield put
@@ -312,33 +312,36 @@
 %7D);%0A  yield put(
-a
+newA
 ction);%0A%7D;%0A%0AputS
@@ -540,16 +540,20 @@
 ction, %7B
+%0A   
  _sceneR
@@ -561,16 +561,36 @@
 ducerKey
+: entry.reducerKey%0A 
  %7D);%0A  y
@@ -598,17 +598,20 @@
 eld put(
-a
+newA
 ction);%0A

fix putSceneAction bug