From 8c1185eeda3b4764a864c6044bebc38a8d85aafb Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Tue, 1 Nov 2016 21:23:42 +0000 Subject: [PATCH] Twenty Seventeen: Fix `supportsInlineSVG()` being unnecessarily called twice * Also, fix spacing inconsistency in comment. Props tywayne. Fixes #38556. git-svn-id: https://develop.svn.wordpress.org/trunk@39081 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyseventeen/assets/js/global.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/assets/js/global.js b/src/wp-content/themes/twentyseventeen/assets/js/global.js index 8c103d6ebe..de64a9c2d7 100644 --- a/src/wp-content/themes/twentyseventeen/assets/js/global.js +++ b/src/wp-content/themes/twentyseventeen/assets/js/global.js @@ -130,9 +130,9 @@ } /** - * Test if inline SVGs are supported. - * @link https://github.com/Modernizr/Modernizr/ - */ + * Test if inline SVGs are supported. + * @link https://github.com/Modernizr/Modernizr/ + */ function supportsInlineSVG() { var div = document.createElement( 'div' ); div.innerHTML = ''; @@ -172,7 +172,6 @@ adjustHeaderHeight(); setQuotesIcon(); - supportsInlineSVG(); if ( true === supportsInlineSVG() ) { document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' ); }