Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit cc2d1b9

Browse files
Corey Wilsonwesleycho
Corey Wilson
authored andcommitted
fix(tests): add style tag once
- Add style tag once to avoid multiplied DOM creation Closes #5557 Fixes #5548
1 parent c8922a2 commit cc2d1b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ module.exports = function(grunt) {
436436
.replace(/\\/g, '\\\\')
437437
.replace(/'/g, "\\'")
438438
.replace(/\r?\n/g, '\\n');
439-
js = `angular.module('ui.bootstrap.${moduleName}').run(function() {!angular.$$csp().noInlineStyle && angular.element(document).find('head').prepend('<style type="text/css">${css}</style>'); });`;
439+
js = `angular.module('ui.bootstrap.${moduleName}').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCss && angular.element(document).find('head').prepend('<style type="text/css">${css}</style>'); angular.$$uibCss = true; });`;
440440
state.js.push(js);
441441

442442
return state;

0 commit comments

Comments
 (0)