Skip to content

Commit

Permalink
fix: prevent saveCSS error on old installations
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 27, 2023
1 parent 272b18c commit 001e311
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockFrontend',
'version' => '2.20.0',
'version' => '2.20.1',
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
Expand Down Expand Up @@ -349,7 +349,9 @@ public function addTopBar(&$html)
/** @var RockMigrations $rm */
$less = __DIR__ . "/bar/bar.less";
if ($rm = $this->wire->modules->get('RockMigrations')) {
$rm->saveCSS($less); // recompile less if changed
// recompile less if changed
// check for method saveCSS to prevent errors on old installations
if (method_exists($rm, "saveCSS")) $rm->saveCSS($less);
}
$css = $this->toUrl("$less.css", true);
$style = "<link rel='stylesheet' href='$css'>";
Expand Down

0 comments on commit 001e311

Please sign in to comment.