Commit 5250ceca authored by Alexander.Trofimov's avatar Alexander.Trofimov

_checkErrorArg return null or error

parent c2979a1a
......@@ -638,7 +638,7 @@
argClone[2] = argClone[2] ? argClone[2].tocNumber() : new cNumber(0);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -801,7 +801,7 @@
argClone[2] = argClone[2] ? argClone[2].tocNumber() : new cNumber(0);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -856,7 +856,7 @@
argClone[1] = argClone[1] ? argClone[1].tocNumber() : new cNumber(1);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -995,7 +995,7 @@
argClone[1] = argClone[1].tocNumber();
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -1360,7 +1360,7 @@
argClone[1] = argClone[1].tocNumber();
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -1833,7 +1833,7 @@
argClone[1] = argClone[1] ? argClone[1].tocNumber() : new cNumber(1);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -1885,7 +1885,7 @@
argClone[2] = argClone[2] ? argClone[2].tocNumber() : new cNumber(0);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......@@ -2088,7 +2088,7 @@
argClone[1] = argClone[1] ? argClone[1].tocNumber() : new cNumber(1);
var argError;
if(false !== (argError = this._checkErrorArg(argClone))){
if (argError = this._checkErrorArg(argClone)) {
return this.value = argError;
}
......
......@@ -2415,15 +2415,12 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
return arg;
};
cBaseFunction.prototype._checkErrorArg = function (argArray) {
var res = false;
for(var i = 0; i < argArray.length; i++)
{
if(argArray[i] instanceof cError)
{
for (var i = 0; i < argArray.length; i++) {
if (cElementType.error === argArray[i].type) {
return argArray[i];
}
}
return res;
return null;
};
/** @constructor */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment