[英]Redux-saga with Internet Explorer
我有一个在IE 11中使用redux-saga的React应用程序
它似乎打破了以下错误
请注意,此应用程序在Chrome中可以在过去3年的版本和Safari中完美运行(除了某些显示问题)
// functions are called bottom to top, this one is called at the end (also can be seen in stack trace below)
function* getGlobalData() {
console.log('Get global data called'); // this is executed
// something is failing from here on
const [
wardrobeResponse,
lastListingsResponse,
] = yield [
call(api_request, {url: 'store/wardrobes/'}),
call(api_request, {url: 'store/last_listings/'}),
]
yield put(actions.wardrobe.success(wardrobeResponse.json));
yield put(actions.lastListings.success(lastListingsResponse.json));
}
/**
* Watches for LOAD_SEARCH_RESULTS action and calls handler
*/
function* getGlobalDataWatcher() {
console.log('Get data - check if working');
console.log("global data watcher saga run")
yield take(Constants.LOAD_GLOBAL_DATA)
console.log('LOAD_GLOBAL_DATA received in saga')
const state = yield select()
if (state.getIn(['global', 'wardrobes']).isEmpty()) {
console.log('Empty global data, call api')
yield call(getGlobalData);
} else {
console.log('Global data already present, dont call API')
}
}
function* data() {
console.log('Get global results saga data called');
yield fork(getGlobalDataWatcher);
}
export default [
data
]
uncaught at data
at loadMeDataWatcher
at loadMeData
TypeError: Object doesn't support this action
at api_request (http://localhost:3002/main.js:5905:3)
at runCallEffect (eval code:446:7)
at runEffect (eval code:370:5)
at next (eval code:259:9)
at currCb (eval code:329:7)
at runSelectEffect (eval code:651:7)
at runEffect (eval code:370:5)
at next (eval code:259:9)
at proc (eval code:214:3)
at resolveIterator (eval code:390:5)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.