Template/JSGlobals

* fixed merging js globals from dynamic content into cached js globals
 * e.g. commenting with item markup on an item page will again create proper item links
This commit is contained in:
Sarjuuk 2025-12-02 14:47:58 +01:00
parent ffffc16d63
commit 957f3bcf20

View file

@ -634,7 +634,12 @@ class TemplateResponse extends BaseResponse
if (!isset($ptJSG[$type]) || $type == Type::USER)
$ptJSG[$type] = $this->jsGlobals[$type];
else
Util::mergeJsGlobals($ptJSG[$type][1], $data);
{
$masterJSG = [$type => &$ptJSG[$type][1]];
Util::mergeJsGlobals($masterJSG, [$type => $data]);
}
unset($masterJSG);
}
$this->result->jsGlobals = $ptJSG;