From 9951761dc3e690cb958b4f11f7a84092466c9c56 Mon Sep 17 00:00:00 2001
From: Marijn Haverbeke <marijnh@gmail.com>
Date: Tue, 15 Dec 2015 22:36:46 +0100
Subject: [PATCH] Fall back to putting CodeMirror in window if this is
 undefined

Issue #3708
---
 lib/codemirror.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/codemirror.js b/lib/codemirror.js
index 5bfa91d6c..07a23f1b8 100644
--- a/lib/codemirror.js
+++ b/lib/codemirror.js
@@ -13,7 +13,7 @@
   else if (typeof define == "function" && define.amd) // AMD
     return define([], mod);
   else // Plain browser env
-    this.CodeMirror = mod();
+    (this || window).CodeMirror = mod();
 })(function() {
   "use strict";
 
-- 
GitLab