fix: (regression 0.52.7) clicking on a Windows drive on file-picker is not working

Massimo Melina committed May 26, 2024 at 18:44 UTC 49d3c69bb4ca1a7a2cce8e53fe4c86cda76f1c7d
1 file changed +2 -2
src/cross.ts
+2 -2
@@ -136,11 +136,11 @@ export function objSameKeys<S extends object,VR=any>(src: S, newValue:(value:Tru
136 }
137
138 export function enforceFinal(sub:string, s:string, evenEmpty=false) {
139 - return evenEmpty && !s || !s.endsWith(sub) ? s + sub : s
139 + return (s ? !s.endsWith(sub) : evenEmpty) ? s + sub : s
140 }
141
142 export function enforceStarting(sub:string, s:string, evenEmpty=false) {
143 - return evenEmpty && !s || !s.startsWith(sub) ? sub + s : s
143 + return (s ? !s.startsWith(sub) : evenEmpty) ? sub + s : s
144 }
145
146 export function removeStarting(sub: string, s: string) {