add es6 shim file
use Object.assign
This commit is contained in:
1
client/es6-shims.js
Normal file
1
client/es6-shims.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
require('object.assign').shim();
|
@ -1,3 +1,4 @@
|
|||||||
|
import unused from './es6-shims'; // eslint-disable-line
|
||||||
import Rx from 'rx';
|
import Rx from 'rx';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Fetchr from 'fetchr';
|
import Fetchr from 'fetchr';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Rx from 'rx';
|
import Rx from 'rx';
|
||||||
import assign from 'object.assign';
|
|
||||||
import { Router } from 'react-router';
|
import { Router } from 'react-router';
|
||||||
import App from './App.jsx';
|
import App from './App.jsx';
|
||||||
import AppCat from './Cat';
|
import AppCat from './Cat';
|
||||||
@ -8,7 +7,7 @@ import childRoutes from './routes';
|
|||||||
|
|
||||||
const router$ = Rx.Observable.fromNodeCallback(Router.run, Router);
|
const router$ = Rx.Observable.fromNodeCallback(Router.run, Router);
|
||||||
|
|
||||||
const routes = assign({ components: App }, childRoutes);
|
const routes = Object.assign({ components: App }, childRoutes);
|
||||||
|
|
||||||
export default function app$(location) {
|
export default function app$(location) {
|
||||||
return router$(routes, location)
|
return router$(routes, location)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Actions } from 'thundercats';
|
import { Actions } from 'thundercats';
|
||||||
import assign from 'object.assign';
|
|
||||||
import debugFactory from 'debug';
|
import debugFactory from 'debug';
|
||||||
|
|
||||||
const debug = debugFactory('freecc:hikes:actions');
|
const debug = debugFactory('freecc:hikes:actions');
|
||||||
@ -45,7 +44,7 @@ export default Actions({
|
|||||||
dashedName,
|
dashedName,
|
||||||
oldState.currentHike
|
oldState.currentHike
|
||||||
);
|
);
|
||||||
return assign({}, oldState, { currentHike });
|
return Object.assign({}, oldState, { currentHike });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user