Fix remaining problems in namespace

This commit is contained in:
Jonathan Frederic 2015-08-18 19:28:30 -07:00
parent 0650a197b6
commit 0a1854a14f
3 changed files with 4 additions and 5 deletions

View File

@ -4,9 +4,8 @@
"use strict";
var Jupyter = window.Jupyter || {};
var jprop = function(name, loaded, module_path, global) {
if (!Jupyter[name]) {
if (!Jupyter.hasOwnProperty(name)) {
Object.defineProperty(Jupyter, name, {
get: function() {
console.warn('accessing `'+name+'` is deprecated. Use `require(\'' + module_path + '\')' + (global ? '[\'' + name + '\']' : '') + '`');
@ -19,7 +18,7 @@
};
var jprop_deferred = function(name, module_path, global) {
if (Jupyter[name] === undefined) {
if (!Jupyter.hasOwnProperty(name)) {
Jupyter[name] = null;
requirejs([module_path], function(loaded) {
jprop(name, loaded, module_path, global);

View File

@ -39,7 +39,7 @@
this.quick_help = options.quick_help;
try {
this.tour = new tour.Tour(this.notebook, this.events);
this.tour = new tour.NotebookTour(this.notebook, this.events);
} catch (e) {
this.tour = undefined;
console.log("Failed to instantiate Notebook Tour", e);

View File

@ -159,5 +159,5 @@
this.notebook.edit_mode();
};
exports.Tour = NotebookTour;
exports.NotebookTour = NotebookTour;