We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 230a4e2 commit e4cb014Copy full SHA for e4cb014
āsrc/get-string-if-constant.js
@@ -8,7 +8,7 @@ import { getStaticValue } from "./get-static-value"
8
*/
9
export function getStringIfConstant(node, initialScope = null) {
10
// Handle the literals that the platform doesn't support natively.
11
- if (node.type === "Literal" && node.value === null) {
+ if (node && node.type === "Literal" && node.value === null) {
12
if (node.regex) {
13
return `/${node.regex.pattern}/${node.regex.flags}`
14
}
0 commit comments