Skip to content

Commit

Permalink
Remove erroneous global wiki references
Browse files Browse the repository at this point in the history
$tw.wiki is used as a global reference in the outer initialisation
modules. It shouldn’t be used in widgets etc.
  • Loading branch information
Jermolene committed May 7, 2014
1 parent e548dd3 commit 6ab68e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/modules/widgets/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {

// Place a tiddler in edit mode
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
var self = this;
function isUnmodifiedShadow(title) {
// jshint eqnull:true
var tiddler = $tw.wiki.getTiddler(title);
var tiddler = self.wiki.getTiddler(title);
return (
$tw.wiki.isShadowTiddler(title) &&
self.wiki.isShadowTiddler(title) &&
tiddler.fields.modified == null
);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/tiddlywiki/codemirror/codemirroreditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ EditTextWidget.prototype.postRender = function() {
lineWrapping: true,
lineNumbers: true
},
tid = $tw.wiki.getTiddler(this.editTitle);
tid = this.wiki.getTiddler(this.editTitle);
if(tid && tid.fields.type) {
cm_opts.mode = tid.fields.type
};
Expand Down

0 comments on commit 6ab68e0

Please sign in to comment.