using optional chaining

This commit is contained in:
antelle 2020-05-09 10:45:12 +02:00
parent 96ee68dee7
commit 6a31bba69c
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
3 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@
"useBuiltIns": true "useBuiltIns": true
}], }],
"@babel/plugin-proposal-optional-catch-binding", "@babel/plugin-proposal-optional-catch-binding",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-external-helpers" "@babel/plugin-external-helpers"
] ]
} }

View File

@ -204,7 +204,7 @@ AutoTypeRunner.prototype.resolveOp = function(op) {
} }
return; return;
} }
if (this.context && this.context.resolved && this.context.resolved[lowerValue]) { if (this.context?.resolved?.[lowerValue]) {
op.type = 'text'; op.type = 'text';
op.value = this.context.resolved[lowerValue]; op.value = this.context.resolved[lowerValue];
return; return;

View File

@ -13,6 +13,7 @@
"@babel/core": "^7.9.6", "@babel/core": "^7.9.6",
"@babel/plugin-external-helpers": "^7.8.3", "@babel/plugin-external-helpers": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/preset-env": "^7.9.6", "@babel/preset-env": "^7.9.6",
"@keeweb/keeweb-native-modules": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.1.6/keeweb-native-modules.tgz", "@keeweb/keeweb-native-modules": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.1.6/keeweb-native-modules.tgz",
"adm-zip": "^0.4.14", "adm-zip": "^0.4.14",