diff --git a/apps/documenteditor/mobile/app/controller/Search.js b/apps/documenteditor/mobile/app/controller/Search.js index aa653f314..37b8a1484 100644 --- a/apps/documenteditor/mobile/app/controller/Search.js +++ b/apps/documenteditor/mobile/app/controller/Search.js @@ -306,7 +306,7 @@ define([ matchword = Common.SharedSettings.get('search-highlight') || false; if (search && search.length) { - if (!this.api.asc_replaceText(search, replace, false, matchcase, matchword)) { + if (!this.api.asc_replaceText(search, replace || '', false, matchcase, matchword)) { var me = this; uiApp.alert( '', @@ -324,7 +324,7 @@ define([ matchword = Common.SharedSettings.get('search-highlight') || false; if (search && search.length) { - this.api.asc_replaceText(search, replace, true, matchcase, matchword); + this.api.asc_replaceText(search, replace || '', true, matchcase, matchword); } }, diff --git a/apps/presentationeditor/mobile/app/controller/Search.js b/apps/presentationeditor/mobile/app/controller/Search.js index 95d74a3d2..fbc1847b2 100644 --- a/apps/presentationeditor/mobile/app/controller/Search.js +++ b/apps/presentationeditor/mobile/app/controller/Search.js @@ -294,7 +294,7 @@ define([ var matchcase = Common.SharedSettings.get('search-case-sensitive') || false; if (search && search.length) { - if (!this.api.asc_replaceText(search, replace, false, matchcase)) { + if (!this.api.asc_replaceText(search, replace || '', false, matchcase)) { var me = this; uiApp.alert( '', @@ -311,7 +311,7 @@ define([ var matchcase = Common.SharedSettings.get('search-case-sensitive') || false; if (search && search.length) { - this.api.asc_replaceText(search, replace, true, matchcase); + this.api.asc_replaceText(search, replace || '', true, matchcase); } }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Search.js b/apps/spreadsheeteditor/mobile/app/controller/Search.js index a7253b3ac..7bc278328 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Search.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Search.js @@ -345,7 +345,7 @@ define([ var options = new Asc.asc_CFindOptions(); options.asc_setFindWhat(search); - options.asc_setReplaceWith(replace); + options.asc_setReplaceWith(replace || ''); options.asc_setIsMatchCase(matchCase); options.asc_setIsWholeCell(matchCell); options.asc_setScanOnOnlySheet(lookInSheet); @@ -369,7 +369,7 @@ define([ var options = new Asc.asc_CFindOptions(); options.asc_setFindWhat(search); - options.asc_setReplaceWith(replace); + options.asc_setReplaceWith(replace || ''); options.asc_setIsMatchCase(matchCase); options.asc_setIsWholeCell(matchCell); options.asc_setScanOnOnlySheet(lookInSheet);