Skip to content

Commit

Permalink
chore: get rid of an instanceof
Browse files Browse the repository at this point in the history
We shouldn't be doing this, ever.
  • Loading branch information
rix0rrr committed Mar 17, 2022
1 parent 16d293d commit 6ca1bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/core/lib/stack-synthesizers/_shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function collectStackMetadata(stack: Stack) {
}

function findParentStack(node: IConstruct): Stack | undefined {
if (node instanceof Stack && node.nestedStackParent === undefined) {
if (Stack.isStack(node) && node.nestedStackParent === undefined) {
return node;
}

Expand Down Expand Up @@ -183,4 +183,4 @@ export function stackTemplateFileAsset(stack: Stack, session: ISynthesisSession)
packaging: FileAssetPackaging.FILE,
sourceHash,
};
}
}

0 comments on commit 6ca1bb3

Please sign in to comment.