Skip to content

Commit 2e4ef8e

Browse files
committed
Clippy Lints page - Fix path watch triggering
1 parent f2e6a99 commit 2e4ef8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

util/gh-pages/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
}, true);
271271

272272
// Watch for changes in the URL path and update the search and lint display
273-
$scope.$watch($location.path, function (newPath) {
273+
$scope.$watch(function () { return $location.path(); }, function (newPath) {
274274
const searchParameter = newPath.substring(1);
275275
if ($scope.search !== searchParameter) {
276276
$scope.search = searchParameter;
@@ -292,12 +292,12 @@
292292
}
293293
});
294294

295-
$scope.$watch($location.search, function (newParameters) {
295+
$scope.$watch(function () { return $location.search(); }, function (newParameters) {
296296
if (!internalURLChange) {
297297
loadFromURLParameters();
298298
}
299299
internalURLChange = false;
300-
});
300+
}, true);
301301

302302
$scope.updatePath = function () {
303303
if (debounceTimeout) {

0 commit comments

Comments
 (0)