X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/06e1d514d3ab31269add6b120fd9481c895fa449..1907bfe7abf8eb4984110bbba0ff48d011aeb6a5:/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 e41f19d6..b49671c6 100644 --- a/redakcja/static/js/wiki/view_search.js +++ b/redakcja/static/js/wiki/view_search.js @@ -90,9 +90,8 @@ else {} self.searchCursor.select(); self.searchCursor.replace(query); - if(self.options['replace-all']) { - while(self.search()) - self.replace(); + if(self.search() && self.options['replace-all']) { + self.replace(); } };