зеркало из https://github.com/mozilla/pjs.git
TemplateToolkit doesn't support .defined on objects. Also, stringify objects early to avoid trying to apply .replace, etc, on them.
This commit is contained in:
Родитель
3f21fb08d5
Коммит
f45fb75c09
|
@ -109,16 +109,19 @@ sub getDefaultString {
|
|||
debugDumpVarsVariables.\${key} = 'empty array';
|
||||
END;
|
||||
ELSE;
|
||||
IF (!variable.defined);
|
||||
IF (!variable.ref and !variable.defined);
|
||||
debugDumpVarsVariables.\${key} = 'undefined';
|
||||
ELSIF (variable.search('^[0-9]+(?:\\\\.[0+9]+)?\$'));
|
||||
debugDumpVarsVariables.\${key} = variable;
|
||||
ELSE;
|
||||
debugDumpVarsVariables.\${key} =
|
||||
'\\'' _
|
||||
variable.replace('\\\\\\\\', '\\\\\\\\')
|
||||
.replace('\\'', '\\\\\\'') _
|
||||
'\\'';
|
||||
variable = "\$variable";
|
||||
IF (variable.search('^[0-9]+(?:\\\\.[0+9]+)?\$'));
|
||||
debugDumpVarsVariables.\${key} = variable;
|
||||
ELSE;
|
||||
debugDumpVarsVariables.\${key} =
|
||||
'\\'' _
|
||||
variable.replace('\\\\\\\\', '\\\\\\\\')
|
||||
.replace('\\'', '\\\\\\'') _
|
||||
'\\'';
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
IF key.length > debugDumpVarsMaxLength;
|
||||
|
|
Загрузка…
Ссылка в новой задаче