@preference-sl/pref-viewer 2.13.0-beta.20 → 2.13.0-beta.21
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/src/file-storage.js +6 -3
package/package.json
CHANGED
package/src/file-storage.js
CHANGED
|
@@ -755,9 +755,12 @@ export default class FileStorage {
|
|
|
755
755
|
}
|
|
756
756
|
await this.#runCleanupIfDue();
|
|
757
757
|
let storedFile = await this.#getFile(uri);
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
if (
|
|
758
|
+
// If there is already a cached file, return it without HEAD revalidation.
|
|
759
|
+
// In ecommerce flow, new IDs/URLs from WASM drive real resource updates.
|
|
760
|
+
if (storedFile) {
|
|
761
|
+
return storedFile;
|
|
762
|
+
}
|
|
763
|
+
if (!storedFile) {
|
|
761
764
|
const fileToStore = await this.#getServerFile(uri);
|
|
762
765
|
if (fileToStore && !!(await this.#putFile(fileToStore, uri))) {
|
|
763
766
|
storedFile = await this.#getFile(uri);
|