Skip to content

Commit

Permalink
Exit early if function have already bee found
Browse files Browse the repository at this point in the history
  • Loading branch information
seadowg committed Dec 4, 2023
1 parent 101f858 commit b4f2941
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@ class DynamicPreloadParseProcessor :
private var containsSearch = false

override fun processXPath(xPathExpression: XPathExpression) {
if (containsPullData) {
return // No need to search if we already found pulldata
}

if (xPathExpression.containsFunc("pulldata")) {
containsPullData = true
}
}

override fun processQuestion(question: QuestionDef) {
if (containsSearch) {
return // No need to search if we already found search
}

if (ExternalDataUtil.getSearchXPathExpression(question.appearanceAttr) != null) {
containsSearch = true
}
Expand Down

0 comments on commit b4f2941

Please sign in to comment.