Suppress error like TypeError: aEvent.target.getSelection is not a function

This commit is contained in:
Piro / YUKI Hiroshi 2015-10-31 00:11:16 +09:00
parent d911e243c6
commit b11a175cbf

View File

@ -41,7 +41,8 @@
switch (aEvent.type)
{
case 'selectionchange':
if (!aEvent.target)
if (!aEvent.target ||
!aEvent.target.getSelection)
return;
global.sendAsyncMessage(TreeStyleTabConstants.MESSAGE_TYPE, {
command : TreeStyleTabConstants.COMMAND_REPORT_SELECTION_CHANGE,