Skip to content

Commit 623560f

Browse files
author
minjk-bl
committed
Edit generator to use on Pipeline app
1 parent 5390100 commit 623560f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

visualpython/js/com/com_generatorV2.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ define([
741741
package.options && package.options.forEach(function(v, i) {
742742
var val = state[v.name];
743743
if (val == undefined || val == '' || val == v.default) {
744-
val = vp_getTagValue(pageThis, v, parent=parent);
744+
if (pageThis) {
745+
val = vp_getTagValue(pageThis, v, parent=parent);
746+
}
745747
}
746748
var id = '${' + v.name + '}';
747749
if (val == undefined || val.trim() == '') {
@@ -802,9 +804,11 @@ define([
802804
if (_VP_SHOW_RESULT && package.options) {
803805
var outputOptList = package.options.filter(x => x.output === true);
804806
var outputStr = '';
805-
outputOptList.forEach(opt => {
806-
outputStr += (outputStr !== ''?', ':'') + vp_getTagValue(pageThis, opt);
807-
})
807+
if (pageThis) {
808+
outputOptList.forEach(opt => {
809+
outputStr += (outputStr !== ''?', ':'') + vp_getTagValue(pageThis, opt);
810+
})
811+
}
808812
if (outputStr != '') {
809813
code += '\n'+ outputStr;
810814
}

0 commit comments

Comments
 (0)