@idetik/core 0.4.2 → 0.4.3

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/index.js CHANGED
@@ -2350,10 +2350,16 @@ class PQ {
2350
2350
  A.state = "unloaded";
2351
2351
  return;
2352
2352
  }
2353
- A.state === "loaded" && !A.visible && !A.prefetch && (A.data = void 0, A.state = "unloaded", A.priority = null, A.orderKey = null, A.prefetch = !1, U.debug(
2354
- "ChunkStore",
2355
- `Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
2356
- ));
2353
+ if (A.state === "loaded" && A.priority === null) {
2354
+ if (A.visible || A.prefetch)
2355
+ throw new Error(
2356
+ `Chunk state inconsistency detected: priority is null but visible=${A.visible} or prefetch=${A.prefetch} for chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
2357
+ );
2358
+ A.data = void 0, A.state = "unloaded", A.orderKey = null, U.debug(
2359
+ "ChunkStore",
2360
+ `Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
2361
+ );
2362
+ }
2357
2363
  }
2358
2364
  validateXYScaleRatios() {
2359
2365
  const A = this.dimensions_.x, I = this.dimensions_.y;