From d9e742251ffa7fd4b3930fb58d6b6185602797ad Mon Sep 17 00:00:00 2001 From: Raymond Ji <34181040+raymondji@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:47:09 -0800 Subject: [PATCH] Fix support for passing predefined app to `openApp()` (#335) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7af98a3..14d15cf 100644 --- a/index.js +++ b/index.js @@ -281,8 +281,8 @@ const open = (target, options) => { }; export const openApp = (name, options) => { - if (typeof name !== 'string') { - throw new TypeError('Expected a `name`'); + if (typeof name !== 'string' && !Array.isArray(name)) { + throw new TypeError('Expected a valid `name`'); } const {arguments: appArguments = []} = options ?? {};