As of now , XMasonry always assumes the presence of children blocks. If you insert the following tags:
<XMasonry></XMasonry>
without any child blocks, you'll get the following error:
Uncaught TypeError: Cannot read property 'length' of undefined
at e.value (modules.js?hash=b342853…:32166)
at modules.js?hash=b342853…:18227
at measureLifeCyclePerf (modules.js?hash=b342853…:17507)
at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (modules.js?hash=b342853…:18226)
at ReactCompositeComponentWrapper._renderValidatedComponent (modules.js?hash=b342853…:18253)
at ReactCompositeComponentWrapper._updateRenderedComponent (modules.js?hash=b342853…:18177)
at ReactCompositeComponentWrapper._performComponentUpdate (modules.js?hash=b342853…:18155)
at ReactCompositeComponentWrapper.updateComponent (modules.js?hash=b342853…:18076)
at ReactCompositeComponentWrapper.performUpdateIfNecessary (modules.js?hash=b342853…:17992)
at Object.performUpdateIfNecessary (modules.js?hash=b342853…:10561)
I personally think it'd be a better developer experience if XMasonry handle this case gracefully (without throwing errors). It's very likely that the children blocks are dynamically created and the collection would be initially empty, which'll result in the above error.
Hello!
As of now , XMasonry always assumes the presence of children blocks. If you insert the following tags:
<XMasonry></XMasonry>
without any child blocks, you'll get the following error:
I personally think it'd be a better developer experience if XMasonry handle this case gracefully (without throwing errors). It's very likely that the children blocks are dynamically created and the collection would be initially empty, which'll result in the above error.
Let me know what you think @ZitRos