File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10- - Nothing yet!
10+ - Fix crash ( [ # 320 ] ( https://github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/320 ) )
1111
1212## [ 0.6.7] - 2024-09-24
1313
Original file line number Diff line number Diff line change @@ -40,8 +40,13 @@ export function maybeResolve(name: string) {
4040 let modpath = resolveCache . get ( name )
4141
4242 if ( modpath === undefined ) {
43- modpath = resolveJsFrom ( fileURLToPath ( import . meta. url ) , name )
44- resolveCache . set ( name , modpath )
43+ try {
44+ modpath = resolveJsFrom ( fileURLToPath ( import . meta. url ) , name )
45+ resolveCache . set ( name , modpath )
46+ } catch ( err ) {
47+ resolveCache . set ( name , null )
48+ return null
49+ }
4550 }
4651
4752 return modpath
You can’t perform that action at this time.
0 commit comments