diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js index 23b9fbd25d..545837edc6 100644 --- a/apps/documenteditor/main/app/controller/Search.js +++ b/apps/documenteditor/main/app/controller/Search.js @@ -124,7 +124,7 @@ define([ for (var l = 0; l < text.length; l++) { var charCode = text.charCodeAt(l), char = text.charAt(l); - if (AscCommon.IsPunctuation(charCode) !== undefined || char.trim() === '') { + if (AscCommon.IsPunctuation(charCode) || char.trim() === '') { isPunctuation = true; break; } diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js index 803114b604..5453d5e3ce 100644 --- a/apps/presentationeditor/main/app/controller/Search.js +++ b/apps/presentationeditor/main/app/controller/Search.js @@ -138,7 +138,7 @@ define([ for (var l = 0; l < text.length; l++) { var charCode = text.charCodeAt(l), char = text.charAt(l); - if (AscCommon.IsPunctuation(charCode) !== undefined || char.trim() === '') { + if (AscCommon.IsPunctuation(charCode) || char.trim() === '') { isPunctuation = true; break; }