Skip to content

Commit

Permalink
Merge pull request #99 from Laravel-Backpack/reorder-basset-block-checks
Browse files Browse the repository at this point in the history
[Bug] Reorder basset block checks
  • Loading branch information
pxpm authored Sep 26, 2023
2 parents a2f0afb + 05b1343 commit cbe1c9d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/BassetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,6 @@ public function bassetBlock(string $asset, string $code, bool $output = true): S
{
$this->loader->start();

// fallback to code on dev mode
if ($this->dev) {
echo $code;

return $this->loader->finish(StatusEnum::DISABLED);
}

// Get asset path and url
$path = $this->getPathHashed($asset, $code);

Expand All @@ -335,6 +328,13 @@ public function bassetBlock(string $asset, string $code, bool $output = true): S

$this->markAsLoaded($path);

// fallback to code on dev mode
if ($this->dev) {
echo $code;

return $this->loader->finish(StatusEnum::DISABLED);
}

// Retrieve from map
$mapped = $this->cacheMap->getAsset($asset);
if ($mapped) {
Expand Down

0 comments on commit cbe1c9d

Please sign in to comment.