Fix "Cannot read property 'send' of undefined" when clicking in a tutorial

This commit is contained in:
Gideon Thomas 2016-01-18 13:08:23 -05:00
Родитель 687b72d269
Коммит 305fb223ec
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -13,8 +13,9 @@ define(function (require, exports, module) {
CSSRewriter = brackets.getModule("filesystem/impls/filer/lib/CSSRewriter");
var Compatibility = require("lib/compatibility"),
MouseManager = require("lib/MouseManager"),
LinkManager = require("lib/LinkManager");
MouseManager = require("lib/MouseManager"),
LinkManager = require("lib/LinkManager"),
Tutorial = require("lib/Tutorial");
var fs = Filer.fs(),
_shouldUseBlobURL;
@ -151,7 +152,8 @@ define(function (require, exports, module) {
// Since we're not instrumenting this doc fully for some reason,
// at least inject the scroll manager so we can track scroll position.
body = body.replace(/<\/\s*head>/,
MouseManager.getRemoteScript(path) + LinkManager.getRemoteScript() + "$&");
(Tutorial.getOverride() ? "" : MouseManager.getRemoteScript(path)) +
LinkManager.getRemoteScript() + "$&");
serve(body);
});
}