Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(search): Close modal if on that entity page.
Browse files Browse the repository at this point in the history
Closes #854
  • Loading branch information
mjschranz committed Jun 3, 2015
1 parent 876a701 commit 9605344
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ module ngApp.components.quickSearch.controllers {
}

goTo(entity, id) {
var options = {};
if (this.$state.params[entity + "Id"] === id) {
this.$modalInstance.close();
return;
}

var options = {};
options[entity + "Id"] = id;
this.$state.go(entity, options, { inherit: false });
}
Expand Down

0 comments on commit 9605344

Please sign in to comment.