X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/13d12f40384027bfbaf7b763fdc64e6a0f9da73d..fd3f68b94d43402806bfce6137726e3017f17883:/redakcja/static/js/wiki/view_search.js?ds=sidebyside diff --git a/redakcja/static/js/wiki/view_search.js b/redakcja/static/js/wiki/view_search.js index ae0fd2db..b49671c6 100644 --- a/redakcja/static/js/wiki/view_search.js +++ b/redakcja/static/js/wiki/view_search.js @@ -90,12 +90,8 @@ else {} self.searchCursor.select(); self.searchCursor.replace(query); - var found = self.search(); - if(self.options['replace-all']) { - while(found) { - self.replace(); - found = self.search(); - } + if(self.search() && self.options['replace-all']) { + self.replace(); } };