mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Fix remaining problems in namespace
This commit is contained in:
parent
0650a197b6
commit
0a1854a14f
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -159,5 +159,5 @@
|
||||
this.notebook.edit_mode();
|
||||
};
|
||||
|
||||
exports.Tour = NotebookTour;
|
||||
exports.NotebookTour = NotebookTour;
|
||||
|
Loading…
Reference in New Issue
Block a user