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:
parent
419dfa52b7
commit
8c1185eeda
@ -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' );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user