diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index ff35fae0f..01b1247b4 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -361,7 +361,7 @@ public function addJs($asset, $priority = null, $pipeline = true, $loading = nul 'asset' => $asset, 'priority' => intval($priority ?: 10), 'order' => count($this->js), - 'pipeline' => (bool)$pipeline, + 'pipeline' => (bool) $pipeline, 'loading' => $loading ?: '', 'group' => $group ?: 'head', 'modified' => $modified @@ -1112,8 +1112,8 @@ protected function buildLocalLink($asset, $absolute = false) } catch (\Exception $e) { } - $base_url = $absolute ? '/' : $this->base_url; - return $asset ? $base_url . ltrim($asset, '/') : false; + $uri = $absolute ? $asset : $this->base_url . ltrim($asset, '/'); + return $asset ? $uri : false; } /**