function render() as Object
if m.top.content = invalid then return invalid
return [
{
name: "Label"
'....
},
{
name: "Label"
'....
}
]
end function
When the component is the root and after the next render tick (content is no longer invalid) Kopytko breaks:
Current Function:
063: sub (elements as Object)
064: rootElement = m._getRootComponent()
065:
066: for each element in elements
067:* if (element.parentId = Invalid)
068: parentElement = rootElement.top
069: else
070: parentElement = rootElement[element.parentId]
071: end if
Source Digest(s):
pkg: dev 1.1.1 f31f77289f1bee3045ec26c97485a566 Kopytko Unit Testing Framework App
Syntax Error. (runtime error &h02) in pkg:/components/renderer/KopytkoDOM.brs(67)
How did you implement it:
When an element is of array type and it is the root component the parent component is one level above it.
How can we verify it:
Run unit tests
Todos:
[ ] Write documentation (if required)
[ ] Fix linting errors
[ ] Enable "Allow edits from maintainers" for this PR
[ ] Update the messages below
Is this ready for review?: YES
Is it a breaking change?: NO
What did you implement:
Consider such example code
When the component is the root and after the next render tick (
content
is no longer invalid) Kopytko breaks:How did you implement it:
When an element is of array type and it is the root component the parent component is one level above it.
How can we verify it:
Run unit tests
Todos:
Is this ready for review?: YES Is it a breaking change?: NO