Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Dec 16, 2024
1 parent 1680c47 commit 90a06c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/hotwire_spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -3607,8 +3607,8 @@ var HotwireSpark = (function () {
await Promise.all(await this.#reloadAllLinks());
}
async #reloadAllLinks() {
const newCssLinks = await this.#loadNewCssLinks();
return newCssLinks.map(link => this.#reloadLinkIfNeeded(link));
const cssLinks = await this.#loadNewCssLinks();
return cssLinks.map(link => this.#reloadLinkIfNeeded(link));
}
async #loadNewCssLinks() {
const reloadedDocument = await reloadHtmlDocument();
Expand Down Expand Up @@ -3675,6 +3675,8 @@ var HotwireSpark = (function () {
return this.reloadCss(fileName);
case "reload_stimulus":
return this.reloadStimulus(fileName);
default:
throw new Error(`Unknown action: ${action}`);
}
},
reloadHtml() {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/javascript/hotwire_spark/reloaders/css_reloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export class CssReloader {
}

async #reloadAllLinks() {
const newCssLinks = await this.#loadNewCssLinks();
return newCssLinks.map(link => this.#reloadLinkIfNeeded(link))
const cssLinks = await this.#loadNewCssLinks();
return cssLinks.map(link => this.#reloadLinkIfNeeded(link))
}

async #loadNewCssLinks() {
Expand Down

0 comments on commit 90a06c8

Please sign in to comment.