From b563d8e98a0bc1a306b93ca52559f75741e66eb4 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 18 Sep 2013 12:12:29 +0100 Subject: [PATCH] Ensure getTiddlerList() returns a copy of the tiddler list Fixes #155 --- core/modules/wiki.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index d4358623a..5f0d703f3 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -538,7 +538,7 @@ Return the content of a tiddler as an array containing each line exports.getTiddlerList = function(title) { var tiddler = this.getTiddler(title); if(tiddler && $tw.utils.isArray(tiddler.fields.list)) { - return tiddler.fields.list; + return tiddler.fields.list.slice(0); } return []; };