Skip to content

Commit

Permalink
refactor(rstream-dot): TS strictNullChecks
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 9, 2019
1 parent 1aad856 commit efca49c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/rstream-dot/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export type NodeType =
export interface Node {
id: number;
label: string;
type: string;
xform: boolean;
body: string;
type?: string;
xform?: boolean;
body?: string;
}

export interface WalkState {
Expand Down
3 changes: 2 additions & 1 deletion packages/rstream-dot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export const walk = (
if (children) {
walk(children, opts, state);
for (let c of children) {
state.rels.push([desc, state.subs.get(c)]);
const childNode = state.subs.get(c);
childNode && state.rels.push([desc, childNode]);
}
}
}
Expand Down

0 comments on commit efca49c

Please sign in to comment.