mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
add "this"
Sorry for my English first. In the closure, the both "typeof" of "document" & "window" are return "undefined" without "this" prefix. But they are under the variable "this". So ...
This commit is contained in:
parent
9825fd2bd0
commit
1a74af445c
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// load dependencies
|
// load dependencies
|
||||||
if (typeof document === 'undefined' && typeof window === 'undefined') {
|
if (typeof this.document === 'undefined' && typeof this.window === 'undefined') {
|
||||||
var jsdom = require('jsdom').jsdom,
|
var jsdom = require('jsdom').jsdom,
|
||||||
jsdomObj = jsdom('', {}),
|
jsdomObj = jsdom('', {}),
|
||||||
window = jsdomObj.defaultView, // jshint ignore:line
|
window = jsdomObj.defaultView, // jshint ignore:line
|
||||||
|
|
Loading…
Reference in New Issue
Block a user