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

Commit

Permalink
fix(tests): add style tag once
Browse files Browse the repository at this point in the history
- Add style tag once to avoid multiplied DOM creation

Closes #5557
Fixes #5548
  • Loading branch information
Corey Wilson authored and wesleycho committed Mar 1, 2016
1 parent c8922a2 commit cc2d1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ module.exports = function(grunt) {
.replace(/\\/g, '\\\\')
.replace(/'/g, "\\'")
.replace(/\r?\n/g, '\\n');
js = `angular.module('ui.bootstrap.${moduleName}').run(function() {!angular.$$csp().noInlineStyle && angular.element(document).find('head').prepend('<style type="text/css">${css}</style>'); });`;
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; });`;
state.js.push(js);

return state;
Expand Down

0 comments on commit cc2d1b9

Please sign in to comment.