Skip to content

Commit 42a8c7f

Browse files
authored
Merge pull request #190 from BuildFire/prod-support-ai-empty-state-issue
fix: Fixed AI empty state showing after manually adding a person
2 parents bb74bc0 + 24616b8 commit 42a8c7f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

control/content/app.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,19 @@
141141
}
142142
};
143143
}])
144-
.factory('Location', [function () {
144+
.factory('Location', ['$timeout', '$location', function ($timeout, $location) {
145145
var _location = window.location;
146146
return {
147147
goTo: function (path) {
148-
_location.href = path;
148+
$timeout(() => {
149+
$location.path(path);
150+
});
149151
},
150152
goToHome: function () {
151-
_location.href = _location.href.substr(0, _location.href.indexOf('#'));
152-
}
153+
$timeout(() => {
154+
$location.path('/');
155+
});
156+
},
153157
};
154158
}])
155159
.factory('RankOfLastItem', [function () {
@@ -183,7 +187,7 @@
183187
console.log(msg.type, window.location.href, msg.id);
184188
switch (msg.type) {
185189
case 'OpenItem':
186-
Location.goTo("#/people/" + msg.id);
190+
Location.goTo("people/" + msg.id);
187191
break;
188192
default:
189193
Buildfire.history.pop();

0 commit comments

Comments
 (0)