From 6ad6421dec660d00d6d7d7b34fc486c0883867f4 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Wed, 8 Dec 2021 15:11:56 +0100 Subject: [PATCH] Remove legacy code when disabled --- templates/ivw-call.html.twig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/ivw-call.html.twig b/templates/ivw-call.html.twig index 89e450f..1a67367 100644 --- a/templates/ivw-call.html.twig +++ b/templates/ivw-call.html.twig @@ -21,6 +21,7 @@ } } +{% if legacy_mode %} var iam_data = { "st": responsive_data.st, "cp": responsive_data.cp, @@ -31,7 +32,7 @@ if ((typeof window.iom !== 'undefined') && (typeof window.iom.c === 'function')) { iom.c(iam_data, 1); } - +{% endif %} if ((typeof window.IOMm !== 'undefined') && (typeof window.IOMm === 'function')) { var IOMmConfigureParameter = { "st": responsive_data.st, @@ -40,9 +41,9 @@ "dg": responsive_data.dg, } - if ("{{ legacy_mode }}" !== "1") { - IOMmConfigureParameter.mh = 5 - } +{% if legacy_mode is empty %} + IOMmConfigureParameter.mh = 5 +{% endif %} IOMm('configure', IOMmConfigureParameter);