mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-15 15:10:30 -08:00
Don't use CodeMirror unless in the browser
Avoids crashes when rendering static tiddlers under Node.js that include edit widgets with CodeMirror.
The tiddler "SampleWindowTemplate" in 05606f72ad was triggering a build error in https://github.com/Jermolene/TiddlyWiki5/runs/4310561088?check_suite_focus=true#step:6:41
This commit is contained in:
parent
05606f72ad
commit
2af632a46d
1 changed files with 1 additions and 1 deletions
|
|
@ -252,6 +252,6 @@ CodeMirrorEngine.prototype.executeTextOperation = function(operation) {
|
|||
return newText;
|
||||
};
|
||||
|
||||
exports.CodeMirrorEngine = CodeMirrorEngine;
|
||||
exports.CodeMirrorEngine = $tw.browser ? CodeMirrorEngine : require("$:/core/modules/editor/engines/simple.js").SimpleEngine;
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue