Skip to content

Commit

Permalink
Updating check to allow string or int
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Nov 8, 2023
1 parent e9cf2f3 commit a2e17c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Context/WebContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function generate($container)
$js = $this->addPreviewCode($baseJs, $hasPreviewRelease, $isPreviewRelease, $container);
$js = str_replace(array('/*!! initContainerHook */', '/*!!! initContainerHook */'), $initContainer, $js);

$ignoreGtmDataLayer = isset($container['ignoreGtmDataLayer']) && $container['ignoreGtmDataLayer'] === 1 ? 'true' : 'false';
$ignoreGtmDataLayer = isset($container['ignoreGtmDataLayer']) && $container['ignoreGtmDataLayer'] == 1 ? 'true' : 'false';
$windowLevelSettingsJs = "var ignoreGtmDataLayer = {$ignoreGtmDataLayer};";
$js = str_replace(array('/*!! windowLevelSettingsHook */', '/*!!! windowLevelSettingsHook */'), $windowLevelSettingsJs, $js);

Expand Down

0 comments on commit a2e17c9

Please sign in to comment.