You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
If you pass an empty object for the children property in your cfg to ac.composite.execute(), Mojito will sort of just hang there. I think I've tracked the issue down to lines 260-262 of composite.common.js (in the function AdapterBuffer.done).
What I think happens is that the buffer.counter property will start at 0, and gets decremented to -1:
... so this.callback() will never execute. In my case, I'd greatly prefer it if it checked for counter <= 0 instead of === 0, so that it could handle empty children objects elegantly.
FYI, my current workaround is to include a dummy child that won't get output anywhere.
The text was updated successfully, but these errors were encountered:
Is a composite mojit with no "children" considered valid configuration ?
If not, then perhaps do the same check as in ac.composite.done() and throw an error if size is 0.
if (!children || Y.Object.size(children) === 0) {
throw new Error('Cannot run composite mojit children because' +
' there are no children defined in the' +
' composite mojit spec.');
}
If you pass an empty object for the children property in your cfg to ac.composite.execute(), Mojito will sort of just hang there. I think I've tracked the issue down to lines 260-262 of composite.common.js (in the function AdapterBuffer.done).
What I think happens is that the buffer.counter property will start at 0, and gets decremented to -1:
if(--this.buffer.counter === 0){
this.callback();
}
... so this.callback() will never execute. In my case, I'd greatly prefer it if it checked for counter <= 0 instead of === 0, so that it could handle empty children objects elegantly.
FYI, my current workaround is to include a dummy child that won't get output anywhere.
The text was updated successfully, but these errors were encountered: