Tags: flarum/framework
Tags
[2.x] Fix realtime extender load order for tags & sticky (TypeError: … …not a constructor) (#4699) * [2.x] Fix realtime extender load order for tags and sticky flarum/realtime registers its Realtime JS extender on the export registry at module-evaluation time, and consumers read it back via flarum.reg.get(). The combined forum.js concatenates extensions in resolveExtensionOrder() order, so realtime must be ordered before any consumer — otherwise the consumer's reg.get runs before realtime's reg.add and instantiates undefined (TypeError: mt(...) is not a constructor). Without a dependency edge that order is reverse-alphabetical by id, so consumers whose id sorts after flarum-realtime (tags, sticky) are emitted before it. flags/likes/lock/messages already declare flarum/realtime as an optional dependency; declare it on tags and sticky too (and normalise sticky's flarum-tags to flarum/tags). Fixes https://discuss.flarum.org/d/39359 * Add changelog entry for realtime ordering fix
PreviousNext