mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't add to the same window to the atom.windows array twice
This commit is contained in:
@@ -25,16 +25,8 @@ class App
|
||||
quit: ->
|
||||
$native.terminate null
|
||||
|
||||
windowIdCounter: 1
|
||||
|
||||
windowOpened: (window) ->
|
||||
id = @windowIdCounter++
|
||||
console.log "window opened! #{id}"
|
||||
window.id = id
|
||||
@windows.push window
|
||||
@windows.push(window) unless _.contains(@windows, window)
|
||||
|
||||
windowClosed: (window) ->
|
||||
console.log "windowClosed #{window.id}"
|
||||
console.log "windows length before #{@windows.length}"
|
||||
_.remove(@windows, window)
|
||||
console.log "windows length after #{@windows.length}"
|
||||
|
||||
Reference in New Issue
Block a user