From 4e896d18a018fd2af70b331ce82e985b7ca79cc4 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Mon, 29 Jul 2024 23:23:39 +0800 Subject: [PATCH] refactor: $tw.utils.extend({},options) -> options || {} --- core/modules/wiki.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 0baf1bdcf..516751a1a 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -1064,7 +1064,7 @@ exports.parseText = function(type,text,options) { }; exports.getParser = function(type,options) { - options = $tw.utils.extend({},options); + options = options || {}; // Select a parser var Parser = $tw.Wiki.parsers[type]; if(!Parser && $tw.utils.getFileExtensionInfo(type)) { @@ -1083,7 +1083,7 @@ exports.getParser = function(type,options) { Parse a tiddler according to its MIME type */ exports.parseTiddler = function(title,options) { - options = $tw.utils.extend({},options); + options = options || {}; var cacheType = options.parseAsInline ? "inlineParseTree" : "blockParseTree", tiddler = this.getTiddler(title), self = this;