mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Variable parsing
expanded the variable parsing to disregard an empty string inside of an empty string ("\"\"")
This commit is contained in:
parent
5e2f915236
commit
9c3b3aab90
@ -25,7 +25,7 @@ angular.module('VariablesHelper', ['Utilities'])
|
||||
return function (variables) {
|
||||
var result = "---", json_obj;
|
||||
if (typeof variables === 'string') {
|
||||
if (variables === "{}" || variables === "null" || variables === "") {
|
||||
if (variables === "{}" || variables === "null" || variables === "" || variables === "\"\"") {
|
||||
// String is empty, return ---
|
||||
} else {
|
||||
try {
|
||||
@ -156,7 +156,9 @@ angular.module('VariablesHelper', ['Utilities'])
|
||||
return function(variableObj) {
|
||||
var newObj;
|
||||
function sortIt(objToSort) {
|
||||
var i, keys = Object.keys(objToSort), newObj = {};
|
||||
var i,
|
||||
keys = Object.keys(objToSort),
|
||||
newObj = {};
|
||||
keys = keys.sort();
|
||||
for (i=0; i < keys.length; i++) {
|
||||
if (typeof objToSort[keys[i]] === 'object' && objToSort[keys[i]] !== null && !Array.isArray(objToSort[keys[i]])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user