diff options
author | Sam Light <sam@lightscale.co.uk> | 2025-04-05 15:40:19 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-04-05 15:40:19 +0100 |
commit | ab781894857497606328cc2962a7e679ad66c431 (patch) | |
tree | cae703b6b1a9ca88341343d6ed3138feab39ee62 | |
parent | 2eebabe00d5f5686241cfdccf807e7ce4cba642e (diff) |
Don't throw on second queue. Just ignore.
-rw-r--r-- | src/Assets.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Assets.php b/src/Assets.php index 6050176..9fedc6e 100644 --- a/src/Assets.php +++ b/src/Assets.php @@ -2,7 +2,6 @@ namespace Lightscale\LaralightAssets; -use Exception; use InvalidArgumentException; class Assets @@ -87,10 +86,7 @@ class Assets { $hash = $file->hash(); - if ($this->queuedFileHashes[$hash] ?? false) { - throw new Exception("File {$file} is already queued"); - } - else { + if (!($this->queuedFileHashes[$hash] ?? false)) $this->queuedFileHashes[$hash] = true; $queue = $footer ? 'queuedFooterFiles' : 'queuedHeadFiles'; $this->{$queue}[] = $file; |