Skip to content

Commit 725a9f2

Browse files
Treat NPM proxy as real NPM
1 parent 8987138 commit 725a9f2

File tree

1 file changed

+5
-1
lines changed
  • packages/snaps-controllers/src/snaps/location

1 file changed

+5
-1
lines changed

packages/snaps-controllers/src/snaps/location/npm.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ export function getNpmCanonicalBasePath(registryUrl: URL, packageName: string) {
351351
* @returns True if the registry is the NPM registry, otherwise false.
352352
*/
353353
function isNPM(registryUrl: URL) {
354-
return registryUrl.toString() === DEFAULT_NPM_REGISTRY.toString();
354+
const registryUrlString = registryUrl.toString();
355+
return (
356+
registryUrlString === DEFAULT_NPM_REGISTRY.toString() ||
357+
registryUrlString === NPM_REGISTRY_PROXY.toString()
358+
);
355359
}
356360

357361
/**

0 commit comments

Comments
 (0)