Skip to content

Commit

Permalink
4.0.1
Browse files Browse the repository at this point in the history
$document undefined
  • Loading branch information
conseilgouz committed Sep 29, 2023
1 parent c4de7fc commit 29f11c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mod_cg_memo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<extension type="module" version="4.2.0" client="site" method="upgrade">
<name>CG Responsive Memo</name>
<author>ConseilGouz</author>
<creationDate>2023-09-28</creationDate>
<creationDate>2023-09-29</creationDate>
<copyright>Copyright (C) 2023 ConseilGouz. All rights reserved.</copyright>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>4.0.0</version>
<version>4.0.1</version>
<namespace path="src">ConseilGouz\Module\Cgmemo</namespace>
<description>CG_MEMO_DESC</description>
<files>
Expand Down
11 changes: 11 additions & 0 deletions mod_cg_memo_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>mod_cg_memo</element>
<type>Module</type>
<version>4.0.1</version>
<note>
<item>Update : 29/09/2023</item>
</note>
<fix>
<item>$document undefined</item>
</fix>
</changelog>
<changelog>
<element>mod_cg_memo</element>
<type>Module</type>
Expand Down
2 changes: 1 addition & 1 deletion tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
$modulefield = 'media/mod_cg_memo/';
$document = Factory::getDocument();
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = Factory::getDocument()->getWebAssetManager();
$wa->registerAndUseStyle('cgmemo',$modulefield.'css/cgmemo.css');
$core = $wa->useAsset('script', 'core');
if ((bool)Factory::getConfig()->get('debug')) { // Mode debug
$document = Factory::getDocument();
$document->addScript(''.URI::base(true).'/media/mod_cg_memo/js/cgmemo.js');
} else {
$wa->registerAndUseScript('cgmemo',$modulefield.'js/cgmemo.js');
Expand Down

0 comments on commit 29f11c7

Please sign in to comment.