File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " svelte-knobs" ,
33 "description" : " Svelte component library for building customizable knob controls." ,
4- "version" : " 0.3.3 " ,
4+ "version" : " 0.3.4 " ,
55 "repository" : {
66 "url" : " https://github.com/eye-wave/svelte-knobs"
77 },
2424 "exports" : {
2525 "." : {
2626 "types" : " ./dist/index.d.ts" ,
27- "svelte" : " ./dist/index.js"
27+ "svelte" : " ./dist/index.js" ,
28+ "module" : " ./dist/index.js"
2829 }
2930 },
3031 "sideEffects" : [
Original file line number Diff line number Diff line change 217217 }
218218 }
219219
220- let shield = document . createElement ( ' div ' ) ;
220+ let shield: HTMLDivElement | null = null ;
221221
222222 $effect (() => {
223223 if (isDragging ) {
224+ if (shield === null ) shield = document .createElement (' div' );
225+
224226 shield .className = ' shield tf68Uh' ;
225227 document .body .append (shield );
226228 document .body .style .userSelect = ' none' ;
227229 } else {
228- shield .remove ();
230+ shield ? .remove ();
229231 document .body .style .userSelect = ' ' ;
230232 }
231233 });
You can’t perform that action at this time.
0 commit comments