1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Revert "Hotfix for iOS Safari mergeOptions clashes"

This reverts commit 1b4c6938f6.

The actual problem was the late loading of the polyfills.
This commit is contained in:
Brett Sun 2015-12-15 16:26:49 +01:00
parent 274f149272
commit 5ee3b07cc1
3 changed files with 32 additions and 20 deletions

27
js/sources/coa_source.js Normal file
View File

@ -0,0 +1,27 @@
'use strict';
import requests from '../utils/requests';
import EditionActions from '../actions/edition_actions';
const CoaSource = {
lookupCoa: {
remote(state) {
return requests.get('coa', { id: state.edition.coa });
},
success: EditionActions.successFetchCoa,
error: EditionActions.errorCoa
},
performCreateCoa: {
remote(state) {
return requests.post('coa_create', {body: { bitcoin_id: state.edition.bitcoin_id }});
},
success: EditionActions.successFetchCoa,
error: EditionActions.errorCoa
}
};
export default CoaSource;

View File

@ -13,24 +13,6 @@ const EditionSource = {
success: EditionActions.successFetchEdition, success: EditionActions.successFetchEdition,
error: EditionActions.errorEdition error: EditionActions.errorEdition
},
// For COA
lookupCoa: {
remote(state) {
return requests.get('coa', { id: state.edition.coa });
},
success: EditionActions.successFetchCoa,
error: EditionActions.errorCoa
},
performCreateCoa: {
remote(state) {
return requests.post('coa_create', {body: { bitcoin_id: state.edition.bitcoin_id }});
},
success: EditionActions.successFetchCoa,
error: EditionActions.errorCoa
} }
}; };

View File

@ -5,6 +5,9 @@ import { alt } from '../alt';
import EditionActions from '../actions/edition_actions'; import EditionActions from '../actions/edition_actions';
import EditionSource from '../sources/edition_source'; import EditionSource from '../sources/edition_source';
import CoaSource from '../sources/coa_source';
import { mergeOptions } from '../utils/general_utils';
class EditionStore { class EditionStore {
@ -19,7 +22,7 @@ class EditionStore {
}; };
this.bindActions(EditionActions); this.bindActions(EditionActions);
this.registerAsync(EditionSource); this.registerAsync(mergeOptions(EditionSource, CoaSource));
} }
onFetchEdition(idToFetch) { onFetchEdition(idToFetch) {