Remove yield nodes not in declarations

Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
pull/10616/head
Delmer Reed 2018-06-20 17:42:54 -04:00
parent b33455e799
commit 280ea0732b
1 changed files with 3 additions and 1 deletions

View File

@ -549,7 +549,9 @@ export class FluxPage extends PureComponent<Props, State> {
return `${declaration.name} = ${this.formatLastSource(s, isLast)}`
}
const funcs = body.funcs.filter(f => f.id !== funcID)
const funcs = body.funcs.filter(
f => f.id !== funcID && f.id !== yieldNodeID
)
const source = this.funcsToSource(funcs)
return this.formatLastSource(source, isLast)
})