From bbfb53f24839556ee25e6605acbd7e2947f81862 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sat, 26 Aug 2017 18:35:09 -0400 Subject: [PATCH] ! --- lib/rule-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rule-context.js b/lib/rule-context.js index 209fedde5cd3..d1530ec7320e 100644 --- a/lib/rule-context.js +++ b/lib/rule-context.js @@ -196,7 +196,7 @@ class RuleContext { if (descriptor.message) { throw new TypeError("context.report() called with a message and a messageId. Please only pass one."); } - if (!messages || Object.prototype.hasOwnProperty.call(messages, id)) { + if (!messages || !Object.prototype.hasOwnProperty.call(messages, id)) { throw new TypeError(`context.report() called with a messageId of '${id}' which is not present in the 'messages' config: ${JSON.stringify(messages, null, 2)}`); }