From a79fcc1f95ad9dda929121ac71e18a628ee4791c Mon Sep 17 00:00:00 2001 From: rebornix Date: Sun, 21 Aug 2016 06:57:54 -0700 Subject: [PATCH] use instanceof to check Array --- src/actions/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/actions.ts b/src/actions/actions.ts index fecf7a37b15f..aa581b93c14e 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -420,7 +420,7 @@ class CommandInsertRegisterContent extends BaseCommand { const register = await Register.get(vimState); let text: string; - if (typeof register.text === "object") { + if (register.text instanceof Array) { text = (register.text as string []).join("\n"); } else { text = register.text;