From 90280e5c074b9c291e5e6b9e6c77e212b5f81fdb Mon Sep 17 00:00:00 2001 From: Madhu H C Date: Wed, 13 Sep 2017 21:21:26 +0530 Subject: [PATCH] Updating command.target to be an Object instead of String Probable fix for the below issue https://github.com/atom/atom/issues/15639 We are accessing nodeName and className from target so it should ideally be an object. Added safe-check and initialize target to be an {} --- lib/command-logger.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/command-logger.coffee b/lib/command-logger.coffee index a3f55c7a..2aa0df2e 100644 --- a/lib/command-logger.coffee +++ b/lib/command-logger.coffee @@ -67,9 +67,10 @@ class CommandLogger # # * `command` Command {Object} to be logged # * `type` Name {String} of the command - # * `target` {String} describing where the command was triggered + # * `target` {Object} Node where the command was triggered logCommand: (command) -> - {type: name, target, time} = command + {type: name, time} = command + target = command.target ? {} return if command.detail?.jQueryTrigger return if name of ignoredCommands