mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't call on when onDidDestroy exists
This commit is contained in:
@@ -343,7 +343,7 @@ class Pane extends Model
|
||||
|
||||
if typeof item.onDidDestroy is 'function'
|
||||
@subscriptions.add item.onDidDestroy => @removeItem(item, true)
|
||||
if typeof item.on is 'function'
|
||||
else if typeof item.on is 'function'
|
||||
@subscribe item, 'destroyed', => @removeItem(item, true)
|
||||
|
||||
@items.splice(index, 0, item)
|
||||
|
||||
Reference in New Issue
Block a user