From 97a8515ba3dc64f4a9e35bdc6cf81b15938d80cc Mon Sep 17 00:00:00 2001 From: Erik Erikson Date: Tue, 3 May 2016 15:40:57 -0700 Subject: [PATCH] Falsy event has no name attribute bugfix Because it is falsy, event cannot have the attribute "name". As such, a misleading undefined error is thrown rather than the more instructive error that the event couldn't be found for the region. This leaves the actual identification of which event couldn't be found up to a good guess, unfortunately. --- lib/actions/EventRemove.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/actions/EventRemove.js b/lib/actions/EventRemove.js index b13e28d83..4cac30364 100644 --- a/lib/actions/EventRemove.js +++ b/lib/actions/EventRemove.js @@ -188,7 +188,7 @@ class EventRemover extends S.classes.Plugin { } _eventRemove(event, region) { - if(!event) throw new SError(`Event could not be found: ${event.name}`); + if(!event) throw new SError(`Event could not be found in region ${region}`); let eventType = event.type.toLowerCase();