1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Check to make sure extraVarsClone exists before attempting to cull passwords

This commit is contained in:
mabashian 2018-04-13 13:05:28 -04:00
parent 2dad8cc980
commit ec1897ac3e

View File

@ -82,7 +82,7 @@ export default
// password $encrypted$ strings so we clone it
const extraVarsClone = _.cloneDeep(scope.promptData.extraVars);
// Replace the survey passwords with $encrypted$ to display to the user
const cleansedExtraVars = Object.assign(extraVarsClone, surveyPasswords);
const cleansedExtraVars = extraVarsClone ? Object.assign(extraVarsClone, surveyPasswords) : {};
scope.promptExtraVars = $.isEmptyObject(scope.promptData.extraVars) ? '---' : '---\n' + jsyaml.safeDump(cleansedExtraVars);