From fde41654660b447d2f3cbee3ef374b812a5c6203 Mon Sep 17 00:00:00 2001 From: Feruz Date: Tue, 21 Aug 2018 07:50:51 +0300 Subject: [PATCH] small fix --- src/controllers/search.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controllers/search.js b/src/controllers/search.js index 53a1ebbdd5..dc97d3b100 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -1,6 +1,7 @@ export default ($scope, $rootScope, $location, $routeParams, steemService, eSteemService) => { - - const searchStr = JSON.parse(decodeURIComponent($routeParams.obj)).str; + + const term = decodeURIComponent($routeParams.obj); + const searchStr = JSON.parse(term.indexOf('?')>-1?term.split('?')[0]:term).str; $scope.searchStr = searchStr; $scope.posts = $rootScope.Data['posts'] || [];