From bea1151a287dc82e81b25e86e9af5841aec72595 Mon Sep 17 00:00:00 2001 From: jonschlinkert Date: Thu, 19 Oct 2017 09:23:04 -0400 Subject: [PATCH] make comparison more specific --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0c4f701..c7da6de 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict'; -/** +/*! * This is almost entirely based on: * https://www.npmjs.com/package/inquirer-autocomplete-prompt * Copyright (c) 2015, Martin Hansen @@ -20,7 +20,7 @@ var utils = require('readline-utils'); function Prompt() { BasePrompt.apply(this, arguments); - if (!this.question.source) { + if (typeof this.question.source !== 'function') { throw new TypeError('expected source to be defined'); }