Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #497 from ZER0/selections-window-null/Bug774301
Browse files Browse the repository at this point in the history
fix Bug 774301: Many "selections(window) is null" during tests r=@Gozala
  • Loading branch information
Gozala committed Jul 17, 2012
2 parents 1b59f33 + 12aaf84 commit 1725ab5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/addon-kit/lib/selection.js
Expand Up @@ -35,6 +35,10 @@ let selections = ns();
observers.add("document-shown", function (document) {
var window = document.defaultView;

// We are not interested in documents without valid defaultView
if (!window)
return;

let selection = selections(window).selection;

// We want to handle only the windows where we added selection's listeners
Expand Down

0 comments on commit 1725ab5

Please sign in to comment.