Check for document
instead of window
#550
+2
−2
Merged
document
instead of window
#550