Fix type conversion (#1466)
This commit is contained in:
parent
73f66df1e2
commit
bc825de39c
|
@ -667,8 +667,14 @@ llapp.controller 'TreeCtrl', [
|
|||
else
|
||||
node.data = data.value
|
||||
# Cast int as int (remember that booleans are int for Perl)
|
||||
if node.type and node.type.match /^(int|bool|trool)$/
|
||||
node.data = parseInt(node.data)
|
||||
if node.type and node.type.match /^(bool|trool|boolOrExpr)$/
|
||||
node.data = node.data.toString()
|
||||
else if node.type and node.type.match /^int$/
|
||||
node.data = parseInt(node.data, 10)
|
||||
|
||||
#if node.type and node.type.match /^(int|bool|trool)$/
|
||||
# node.data = parseInt(node.data)
|
||||
|
||||
# Split SAML types
|
||||
else if node.type and node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) and not (typeof node.data == 'object')
|
||||
node.data = node.data.split ';'
|
||||
|
|
|
@ -807,8 +807,10 @@ This file contains:
|
|||
} else {
|
||||
node.data = data.value;
|
||||
}
|
||||
if (node.type && node.type.match(/^(int|bool|trool)$/)) {
|
||||
node.data = parseInt(node.data);
|
||||
if (node.type && node.type.match(/^(bool|trool|boolOrExpr)$/)) {
|
||||
node.data = node.data.toString();
|
||||
} else if (node.type && node.type.match(/^int$/)) {
|
||||
node.data = parseInt(node.data, 10);
|
||||
} else if (node.type && node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) && !(typeof node.data === 'object')) {
|
||||
node.data = node.data.split(';');
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user