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
This commit is contained in:
David A. Kennedy 2016-11-01 21:23:42 +00:00
parent 419dfa52b7
commit 8c1185eeda
1 changed files with 3 additions and 4 deletions

View File

@ -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 = '<svg/>';
@ -172,7 +172,6 @@
adjustHeaderHeight();
setQuotesIcon();
supportsInlineSVG();
if ( true === supportsInlineSVG() ) {
document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' );
}