nodebb-plugin-ezoic-infinite 1.5.53 → 1.5.54
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/package.json +1 -1
- package/public/client.js +6 -1
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -386,10 +386,15 @@ function withInternalDomChange(fn) {
|
|
|
386
386
|
try {
|
|
387
387
|
const domId = `${PLACEHOLDER_PREFIX}${id}`;
|
|
388
388
|
const ph = document.getElementById(domId);
|
|
389
|
-
|
|
389
|
+
|
|
390
|
+
// If the element is already gone, do NOT call destroyPlaceholders (Ezoic will log "does not exist").
|
|
391
|
+
if (!ph || !ph.isConnected) return;
|
|
392
|
+
|
|
393
|
+
if (ph.dataset) {
|
|
390
394
|
delete ph.dataset.ezDefined;
|
|
391
395
|
delete ph.dataset.ezRequested;
|
|
392
396
|
}
|
|
397
|
+
|
|
393
398
|
const ez = window.ezstandalone;
|
|
394
399
|
if (ez && typeof ez.destroyPlaceholders === 'function') {
|
|
395
400
|
ez.destroyPlaceholders([domId]);
|