Suppress error like TypeError: aEvent.target.getSelection is not a function
This commit is contained in:
parent
d911e243c6
commit
b11a175cbf
@ -41,7 +41,8 @@
|
|||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
case 'selectionchange':
|
case 'selectionchange':
|
||||||
if (!aEvent.target)
|
if (!aEvent.target ||
|
||||||
|
!aEvent.target.getSelection)
|
||||||
return;
|
return;
|
||||||
global.sendAsyncMessage(TreeStyleTabConstants.MESSAGE_TYPE, {
|
global.sendAsyncMessage(TreeStyleTabConstants.MESSAGE_TYPE, {
|
||||||
command : TreeStyleTabConstants.COMMAND_REPORT_SELECTION_CHANGE,
|
command : TreeStyleTabConstants.COMMAND_REPORT_SELECTION_CHANGE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user