We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d2cf23 commit 0529924Copy full SHA for 0529924
src/base/plugin/addStyle.js
@@ -4,17 +4,10 @@ import { registerModule } from 'src/utils/plugin.js';
4
5
wrap(() => {
6
const name = 'addStyle';
7
- let style;
8
-
9
- function getStyle(plugin) { // Lazy initialize style, so as to not clutter the dom
10
- if (!style) {
11
- style = newStyle(plugin);
12
- }
13
- return style;
14
15
16
function mod(plugin) {
17
- return (...styles) => getStyle(plugin).add(...styles);
+ const style = newStyle(plugin);
+ return (...styles) => style.add(...styles);
18
}
19
20
registerModule(name, mod);
0 commit comments