diff options
Diffstat (limited to 'fxjs/cfxjse_resolveprocessor.cpp')
-rw-r--r-- | fxjs/cfxjse_resolveprocessor.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fxjs/cfxjse_resolveprocessor.cpp b/fxjs/cfxjse_resolveprocessor.cpp index beb0541a49..b602db24ec 100644 --- a/fxjs/cfxjse_resolveprocessor.cpp +++ b/fxjs/cfxjse_resolveprocessor.cpp @@ -346,14 +346,16 @@ bool CFXJSE_ResolveProcessor::ResolveNormal(CFXJSE_ResolveNodeData& rnd) { CXFA_Node* pInstanceManager = curNode->AsNode()->GetInstanceMgrOfSubform(); if (pInstanceManager) { - pProp = pInstanceManager->JSObject()->GetProperty<CXFA_Occur>( - 0, XFA_Element::Occur, true); + pProp = pInstanceManager->JSObject()->GetOrCreateProperty<CXFA_Occur>( + 0, XFA_Element::Occur); } } else { XFA_Element eType = CXFA_Node::NameToElement(wsName); - if (eType != XFA_Element::Unknown) { - pProp = curNode->AsNode()->JSObject()->GetProperty<CXFA_Node>( - 0, eType, eType != XFA_Element::PageSet); + if (eType == XFA_Element::PageSet) { + pProp = curNode->AsNode()->JSObject()->GetProperty<CXFA_Node>(0, eType); + } else if (eType != XFA_Element::Unknown) { + pProp = curNode->AsNode()->JSObject()->GetOrCreateProperty<CXFA_Node>( + 0, eType); } } if (pProp) { |