File tree 1 file changed +7
-4
lines changed
src/cdk/schematics/ng-update
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,13 @@ export class DevkitFileSystem extends FileSystem {
53
53
try {
54
54
this . _tree . get ( dirPath ) ;
55
55
} catch ( e ) {
56
- // Note: We do not use an `instanceof` check here. It could happen that the devkit version
57
- // used by the CLI is different than the one we end up loading. This can happen depending
58
- // on how Yarn/NPM hoists the NPM packages / whether there are multiple versions installed.
59
- if ( e instanceof Error && e . constructor . name === 'PathIsDirectoryException' ) {
56
+ // Note: We do not use an `instanceof` check here. It could happen that
57
+ // the devkit version used by the CLI is different than the one we end up
58
+ // loading. This can happen depending on how Yarn/NPM hoists the NPM
59
+ // packages / whether there are multiple versions installed. Typescript
60
+ // throws a compilation error if the type isn't specified and we can't
61
+ // check the type, so we have to cast the error output to any.
62
+ if ( ( e as any ) . constructor . name === 'PathIsDirectoryException' ) {
60
63
return true ;
61
64
}
62
65
}
You can’t perform that action at this time.
0 commit comments