Skip to content

Commit 6b0cacd

Browse files
authored
chore: get rid of an instanceof (#19448)
We shouldn't be doing this, ever. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a257846 commit 6b0cacd

File tree

1 file changed

+2
-2
lines changed
  • packages/@aws-cdk/core/lib/stack-synthesizers

1 file changed

+2
-2
lines changed

packages/@aws-cdk/core/lib/stack-synthesizers/_shared.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function collectStackMetadata(stack: Stack) {
9595
}
9696

9797
function findParentStack(node: IConstruct): Stack | undefined {
98-
if (node instanceof Stack && node.nestedStackParent === undefined) {
98+
if (Stack.isStack(node) && node.nestedStackParent === undefined) {
9999
return node;
100100
}
101101

@@ -183,4 +183,4 @@ export function stackTemplateFileAsset(stack: Stack, session: ISynthesisSession)
183183
packaging: FileAssetPackaging.FILE,
184184
sourceHash,
185185
};
186-
}
186+
}

0 commit comments

Comments
 (0)