mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-15 11:11:24 -07:00
Avoid optional chaining syntax
So that we can run on older Node.js versions
This commit is contained in:
parent
b698b3e9cf
commit
4050ba5f92
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue