Skip to content

error when mergeWith argument is an array #7278

@caikan

Description

@caikan

Describe the bug

mergeWith can accept an ObservableInput as an argument, but when the argument is an array (it is a legal ObservableInput), an error will be reported:
You provided 'xxx' where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.

Expected behavior

Treat the array as a normal ObservableInput

Reproduction code

import { EMPTY, mergeWith } from 'rxjs';

EMPTY.pipe(mergeWith([1])).subscribe(console.log);

Reproduction URL

https://stackblitz.com/edit/rxjs-aixohl?file=index.ts

Version

7.8

Environment

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions