Fixing tiddler importation.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-09-01 17:42:21 -05:00
parent c1b4ec2209
commit 6803915e06
2 changed files with 3 additions and 4 deletions

View File

@ -117,9 +117,8 @@ Tiddler >> fromDictionary: aDictionary [
modified: (aDictionary at: 'modified' ifAbsentPut: [ nil ]); modified: (aDictionary at: 'modified' ifAbsentPut: [ nil ]);
modifier: (aDictionary at: 'modifier' ifAbsentPut: [ nil ]); modifier: (aDictionary at: 'modifier' ifAbsentPut: [ nil ]);
type: (aDictionary at: 'type' ifAbsentPut: [ nil ]); type: (aDictionary at: 'type' ifAbsentPut: [ nil ]);
caption: (aDictionary at: 'caption' ifAbsentPut: [ nil ]). caption: (aDictionary at: 'caption' ifAbsentPut: [ nil ]);
self bag: (aDictionary at: 'bag' ifAbsentPut: [ nil ]);
bag: (aDictionary at: 'bag');
revision: (aDictionary at: 'revision' ifAbsentPut: [ nil ]). revision: (aDictionary at: 'revision' ifAbsentPut: [ nil ]).
customKeys := aDictionary keys copyWithoutAll: (self class instanceVariables collect: [ :each | each name ]). customKeys := aDictionary keys copyWithoutAll: (self class instanceVariables collect: [ :each | each name ]).
customKeys ifEmpty: [ ^ self ]. customKeys ifEmpty: [ ^ self ].

View File

@ -25,7 +25,7 @@ TiddlyWiki >> file: anObject [
] ]
{ #category : 'accessing' } { #category : 'accessing' }
TiddlyWiki >> importJSONTiddlers [ TiddlyWiki >> importJSONTiddlersFile [
| tiddlersDict | | tiddlersDict |
self tiddlersJSONFile ifNil: [ ^ self ]. self tiddlersJSONFile ifNil: [ ^ self ].
tiddlersDict := STONJSON fromString: self tiddlersJSONFile contents. tiddlersDict := STONJSON fromString: self tiddlersJSONFile contents.