Skip to content

Commit

Permalink
Fix inline automatically for livewire
Browse files Browse the repository at this point in the history
  • Loading branch information
mbardelmeijer committed Nov 23, 2020
1 parent 179221f commit c2fd5f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public function __construct(string $name)

$this->attributes = collect(); // PHP 7.4 doesn't support defaults by function.

// Automatically inline SVGs in Ajax requests, as the spritesheet isn't up-to-date then.
// Automatically inline SVGs in Ajax requests or Livewire requests, as the spritesheet isn't up-to-date then.
if (config('svg.inline_for_ajax', true)) {
$this->inline(Request::ajax());
$this->inline(Request::ajax() || Request::header('x-livewire'));
}
}

Expand Down

0 comments on commit c2fd5f9

Please sign in to comment.