@planningcenter/topbar 12.2.4-qa-881.1 → 12.2.4-qa-881.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/topbar.js +10 -0
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +10 -0
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +10 -0
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +10 -0
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/topbar.js
CHANGED
|
@@ -3732,6 +3732,16 @@ let hasTriggeredObserve = false;
|
|
|
3732
3732
|
function observe() {
|
|
3733
3733
|
if (hasTriggeredObserve) return;
|
|
3734
3734
|
hasTriggeredObserve = true;
|
|
3735
|
+
// The module-load snapshot above can predate meta tags that appear later
|
|
3736
|
+
// in <head> (e.g. pco:resource, yielded right before </head>) if this
|
|
3737
|
+
// module's own script tag isn't deferred and runs mid-parse. Those tags
|
|
3738
|
+
// never mutate afterward, so the observer alone would never catch them.
|
|
3739
|
+
// Re-read once now, since observe() is only called once a consumer is
|
|
3740
|
+
// actually mounting, which is always after the document has fully parsed.
|
|
3741
|
+
const freshState = getAllPcoMeta();
|
|
3742
|
+
if (!shallowCompare(store.getState(), freshState)) {
|
|
3743
|
+
store.setState(freshState);
|
|
3744
|
+
}
|
|
3735
3745
|
observer.observe(document.head, {
|
|
3736
3746
|
attributes: true,
|
|
3737
3747
|
childList: true,
|