浏览代码

Merge pull request #12392 from dehrax/12248-fix

Fix selecting current dashboard from search does not reload dashboard
Marcus Efraimsson 7 年之前
父节点
当前提交
98a7f258af
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      public/app/core/components/search/search_results.ts

+ 2 - 1
public/app/core/components/search/search_results.ts

@@ -63,7 +63,8 @@ export class SearchResultsCtrl {
   }
 
   onItemClick(item) {
-    if (this.$location.path().indexOf(item.url) > -1) {
+    //Check if one string can be found in the other
+    if (this.$location.path().indexOf(item.url) > -1 || item.url.indexOf(this.$location.path()) > -1) {
       appEvents.emit('hide-dash-search');
     }
   }