Merge pull request #11997 from Snuffleupagus/nullish-coalescing
Add basic support for the nullish coalescing operator `??`
This commit is contained in:
commit
c809f00b3b
@ -215,6 +215,12 @@ function createWebpackConfig(defines, output) {
|
|||||||
options: {
|
options: {
|
||||||
presets: skipBabel ? undefined : ["@babel/preset-env"],
|
presets: skipBabel ? undefined : ["@babel/preset-env"],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
[
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||||
|
{
|
||||||
|
loose: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
"@babel/plugin-transform-modules-commonjs",
|
"@babel/plugin-transform-modules-commonjs",
|
||||||
[
|
[
|
||||||
"@babel/plugin-transform-runtime",
|
"@babel/plugin-transform-runtime",
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.10.1",
|
"@babel/core": "^7.10.1",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1",
|
||||||
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
|
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
|
||||||
"@babel/plugin-transform-runtime": "^7.10.1",
|
"@babel/plugin-transform-runtime": "^7.10.1",
|
||||||
"@babel/preset-env": "^7.10.1",
|
"@babel/preset-env": "^7.10.1",
|
||||||
|
@ -448,7 +448,7 @@ class PDFThumbnailView {
|
|||||||
get _thumbPageTitle() {
|
get _thumbPageTitle() {
|
||||||
return this.l10n.get(
|
return this.l10n.get(
|
||||||
"thumb_page_title",
|
"thumb_page_title",
|
||||||
{ page: this.pageLabel !== null ? this.pageLabel : this.id },
|
{ page: this.pageLabel ?? this.id },
|
||||||
"Page {{page}}"
|
"Page {{page}}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -456,7 +456,7 @@ class PDFThumbnailView {
|
|||||||
get _thumbPageCanvas() {
|
get _thumbPageCanvas() {
|
||||||
return this.l10n.get(
|
return this.l10n.get(
|
||||||
"thumb_page_canvas",
|
"thumb_page_canvas",
|
||||||
{ page: this.pageLabel !== null ? this.pageLabel : this.id },
|
{ page: this.pageLabel ?? this.id },
|
||||||
"Thumbnail of Page {{page}}"
|
"Thumbnail of Page {{page}}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user