mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Avoid optional chaining syntax
So that we can run on older Node.js versions
This commit is contained in:
parent
b698b3e9cf
commit
4050ba5f92
@ -159,7 +159,7 @@ SqlTiddlerStore.prototype.processIncomingTiddler = function(tiddlerFields, exist
|
||||
if(fileSize <= attachmentSizeLimit) {
|
||||
const existingAttachmentMeta = this.attachmentStore.getAttachmentMetadata(existing_attachment_blob);
|
||||
const hasCanonicalField = !!tiddlerFields._canonical_uri;
|
||||
const skipAttachment = hasCanonicalField && (tiddlerFields._canonical_uri === (existingAttachmentMeta?._canonical_uri || existing_canonical_uri));
|
||||
const skipAttachment = hasCanonicalField && (tiddlerFields._canonical_uri === (existingAttachmentMeta ? existingAttachmentMeta._canonical_uri : existing_canonical_uri));
|
||||
shouldProcessAttachment = !skipAttachment;
|
||||
} else {
|
||||
shouldProcessAttachment = false;
|
||||
@ -174,7 +174,7 @@ SqlTiddlerStore.prototype.processIncomingTiddler = function(tiddlerFields, exist
|
||||
_canonical_uri: tiddlerFields._canonical_uri
|
||||
});
|
||||
|
||||
if(tiddlerFields?._canonical_uri) {
|
||||
if(tiddlerFields && tiddlerFields._canonical_uri) {
|
||||
delete tiddlerFields._canonical_uri;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user