Skip to content

Commit 74f507d

Browse files
authored
Merge pull request #21 from web3dev1337/feature/readme-refresh
fix: stop preset auto-load overriding Corona default
2 parents f711052 + 323bd43 commit 74f507d

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/preset-loader.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ export class PresetLoader {
108108
this._buildFilters();
109109
this._renderGrid();
110110
this._loadFromURL();
111-
this._generateAllThumbs();
112111
} catch (err) {
113112
console.error("[fxgen] preset manifest load failed:", err);
114113
}
@@ -339,14 +338,13 @@ export class PresetLoader {
339338
const presetId = url.searchParams.get("preset");
340339
const projectId = url.searchParams.get("project");
341340
const match = this.manifest.find(item => item.id === (projectId || presetId));
342-
if (match) {
343-
this.load(match);
344-
return;
345-
}
346-
if (this.manifest.length > 0) this.load(this.manifest[0]);
341+
if (match) this.load(match);
347342
}
348343

349-
show() { this.panel.style.display = "block"; }
344+
show() {
345+
this.panel.style.display = "block";
346+
this._generateAllThumbs();
347+
}
350348
hide() { this.panel.style.display = "none"; }
351349
toggle() {
352350
this.panel.style.display = this.panel.style.display === "none" ? "block" : "none";

0 commit comments

Comments
 (0)