refactor(edit) onSave isContainStrAtBegin(text, error) -> /^error/.test(text)

This commit is contained in:
coderaiser 2014-10-27 10:55:52 -04:00
parent ee5c15b901
commit 86093a5606

View file

@ -492,7 +492,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
function onSave(text) {
var ret,
size = Format.size(Value.length),
isError = Util.isContainStrAtBegin(text, 'error'),
isError = /^error/.test(text),
path = Info.path,
msg = '\nShould I save file anyway?';