From c232eb2478f16ed913de6eced7ed18d03ca7a1fb Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Wed, 24 Oct 2018 22:30:41 +1100 Subject: [PATCH] Fix SVG issue for older browsers (fixes #1191) --- src/js/controls.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/controls.js b/src/js/controls.js index 785f100d..efc45e8a 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -111,10 +111,11 @@ const controls = { // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href if ('href' in use) { use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path); - } else { - use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); } + // Always set the older attribute even though it's "deprecated" (it'll be around for ages) + use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); + // Add to icon.appendChild(use);