mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 08:17:07 +00:00
removing unnecessary if
This commit is contained in:
parent
b9619d8c68
commit
332adefd0d
1 changed files with 2 additions and 4 deletions
|
@ -305,7 +305,7 @@ export function connect(srcNode: OutputNode, dstNode: InputNode, outputNumber =
|
|||
assert(srcNode.numberOfOutputs > 0, "Cannot connect from node with no outputs");
|
||||
|
||||
// resolve the input of the dstNode
|
||||
while (dstNode instanceof ToneAudioNode || dstNode instanceof Param) {
|
||||
while ((dstNode instanceof ToneAudioNode || dstNode instanceof Param)) {
|
||||
if (isDefined(dstNode.input)) {
|
||||
dstNode = dstNode.input;
|
||||
}
|
||||
|
@ -342,9 +342,7 @@ export function disconnect(
|
|||
// resolve the destination node
|
||||
if (isDefined(dstNode)) {
|
||||
while (dstNode instanceof ToneAudioNode) {
|
||||
if (dstNode.input) {
|
||||
dstNode = dstNode.input;
|
||||
}
|
||||
dstNode = dstNode.input;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue