We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2da1b13 + 5266e45 commit 68144d1Copy full SHA for 68144d1
.babelrc
@@ -0,0 +1,5 @@
1
+{
2
+ "plugins": [
3
+ "@babel/plugin-proposal-optional-chaining"
4
+ ]
5
+}
package.json
@@ -48,6 +48,7 @@
48
"vite": "^4.1.3"
49
},
50
"devDependencies": {
51
+ "@babel/plugin-proposal-optional-chaining": "^7.21.0",
52
"@types/node": "^18.14.1",
53
"@vuepress/core": "^2.0.0-beta.60",
54
"@vuepress/utils": "^2.0.0-beta.60",
src/node/plugins/replacer.ts
@@ -70,7 +70,7 @@ export class Replacer
70
71
link = link.replace('$' + i, match[i])
72
73
- value = replaces !== undefined && replaces[i] !== undefined
+ value = !! replaces?.[i]
74
? value.replace('$' + i, replaces[i](match[i]))
75
: value.replace('$' + i, match[i])
76
}
0 commit comments