File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " svelte-knobs" ,
3
3
"description" : " Svelte component library for building customizable knob controls." ,
4
- "version" : " 0.3.3 " ,
4
+ "version" : " 0.3.4 " ,
5
5
"repository" : {
6
6
"url" : " https://github.com/eye-wave/svelte-knobs"
7
7
},
24
24
"exports" : {
25
25
"." : {
26
26
"types" : " ./dist/index.d.ts" ,
27
- "svelte" : " ./dist/index.js"
27
+ "svelte" : " ./dist/index.js" ,
28
+ "module" : " ./dist/index.js"
28
29
}
29
30
},
30
31
"sideEffects" : [
Original file line number Diff line number Diff line change 217
217
}
218
218
}
219
219
220
- let shield = document . createElement ( ' div ' ) ;
220
+ let shield: HTMLDivElement | null = null ;
221
221
222
222
$effect (() => {
223
223
if (isDragging ) {
224
+ if (shield === null ) shield = document .createElement (' div' );
225
+
224
226
shield .className = ' shield tf68Uh' ;
225
227
document .body .append (shield );
226
228
document .body .style .userSelect = ' none' ;
227
229
} else {
228
- shield .remove ();
230
+ shield ? .remove ();
229
231
document .body .style .userSelect = ' ' ;
230
232
}
231
233
});
You can’t perform that action at this time.
0 commit comments