From 69b2553854782476a52ea16c4845d7dd50141948 Mon Sep 17 00:00:00 2001 From: Blake Newman Date: Mon, 4 Jun 2018 16:41:01 +0200 Subject: [PATCH] fix: Ensure that recieved is not null | undefined (#6) --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index b4f7b4f..e9f60df 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,8 @@ const beautify = require('pretty') -const isHtmlString = received => typeof received === 'string' && received[0] === '<' +const isHtmlString = received => received && typeof received === 'string' && received[0] === '<' const isVueWrapper = received => ( + recieved && typeof received === 'object' && typeof received.isVueInstance === 'function' )