Skip to content

Commit

Permalink
fix(dep): import createBrowserHistory in ESM way
Browse files Browse the repository at this point in the history
affects: @tao.js/router

fixes warning from history package
  • Loading branch information
eudaimos committed May 31, 2019
1 parent 4785f86 commit 9cb6d32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/tao-router/src/Router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import createHistory from 'history/createBrowserHistory';
// import createHistory from 'history/createBrowserHistory';
import { createBrowserHistory as createHistory } from 'history';
import routington from 'routington';
import get from 'get-value';
import set from 'set-value';
Expand Down Expand Up @@ -67,6 +68,7 @@ function reactToRoute(TAO, match) {
pathMatched.o = capitalize(pathMatched.o);
}
console.log('reactToRoute::node.defaultData:', match.node.defaultData);
console.log('reactToRoute::node.attached:', match.node.attached);
match.node.attached.forEach(trigram => {
const defaultData = match.node.defaultData
? match.node.defaultData.get(trigram.key)
Expand All @@ -84,6 +86,7 @@ function reactToRoute(TAO, match) {
);

TAO.setCtx({ t: 'Route', a: 'Match', o: ac.o }, [match.node.route, ac]);
console.log('reactToRoute::TAO.setAppCtx::ac', ac);
TAO.setAppCtx(ac);
});
}
Expand Down Expand Up @@ -244,6 +247,7 @@ export default class Router {
// }
// });
if (incoming.length) {
console.log('adding handlers for incoming:', incoming);
incoming.forEach(inAc => {
TAO.addInlineHandler(inAc, (tao, data) => {
console.log('Router::incoming AC handler:', { tao, data });
Expand Down

0 comments on commit 9cb6d32

Please sign in to comment.