mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-15 19:55:40 +00:00
Refactored the Tiddler.getFields() method
This commit is contained in:
parent
1e4c91d348
commit
fa08941a75
@ -257,7 +257,7 @@ $tw.Tiddler = function(/* [fields,] fields */) {
|
||||
this.fields = {};
|
||||
for(var c=0; c<arguments.length; c++) {
|
||||
var arg = arguments[c],
|
||||
src = (arg instanceof $tw.Tiddler) ? arg.getFields() : arg;
|
||||
src = (arg instanceof $tw.Tiddler) ? arg.fields : arg;
|
||||
for(var t in src) {
|
||||
if(src[t] === undefined) {
|
||||
if(t in this.fields) {
|
||||
@ -276,10 +276,6 @@ $tw.Tiddler = function(/* [fields,] fields */) {
|
||||
}
|
||||
};
|
||||
|
||||
$tw.Tiddler.prototype.getFields = function() {
|
||||
return this.fields;
|
||||
};
|
||||
|
||||
/*
|
||||
Hashmap of field plugins by plugin name
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user