Skip to content

Commit e08adc3

Browse files
authored
Fix: Move lscache.setBucket up
1 parent 1237089 commit e08adc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Resources/Private/Main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import lscache from "lscache";
22

3+
lscache.setBucket("icons");
4+
35
function replaceTag(element, markup) {
46
const attributes = [...element.attributes]
57
.filter((item) => item.name != "x-data")
@@ -16,7 +18,6 @@ function replaceTag(element, markup) {
1618
window.addEventListener("alpine:init", () => {
1719
window.Alpine.data("icon", (segment) => ({
1820
init() {
19-
lscache.setBucket("icons");
2021
const cache = lscache.get(segment);
2122
if (cache && typeof cache === "string") {
2223
replaceTag(this.$el, cache);

0 commit comments

Comments
 (0)