Small fixes

This commit is contained in:
SachaG 2017-12-17 18:00:48 +09:00
parent 983c08d52f
commit 4d55c2f788
3 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ class App extends PureComponent {
}
componentWillUpdate(nextProps) {
if (nextProps.currentUser) {
if (!this.props.currentUser && nextProps.currentUser) {
runCallbacks('events.identify', nextProps.currentUser);
}
}

View file

@ -11,7 +11,7 @@ import {
Track Page
*/
function segmentTrackPage(empty, route) {
function segmentTrackPage(route) {
const { name, path } = route;
const properties = {
url: Utils.getSiteUrl().slice(0, -1) + path,

View file

@ -25,5 +25,5 @@ export const addIdentifyFunction = func => {
};
export const addPageFunction = func => {
addCallback('router.onUpdate', func);
addCallback('router.onUpdate', (empty, route) => func(route));
};