From 34a6d5e6e4b91e3990e4281cd3aa1ef7d9be829a Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 9 Nov 2016 13:12:18 -0800 Subject: [PATCH] simplification --- core/css.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/css.js b/core/css.js index 7c42cff1a..bac0d628c 100644 --- a/core/css.js +++ b/core/css.js @@ -86,11 +86,7 @@ Blockly.Css.inject = function(hasCss, pathToMedia) { text = text.replace(/<<>>/g, Blockly.Css.mediaPath_); // Inject CSS tag at start of head. var cssNode = document.createElement('style'); - if (document.head.firstChild) { - document.head.insertBefore(cssNode, document.head.firstChild); - } else { - document.head.appendChild(cssNode); - } + document.head.insertBefore(cssNode, document.head.firstChild); var cssTextNode = document.createTextNode(text); cssNode.appendChild(cssTextNode);