From 1d57229123c9337ca38401598f85aea4b2381768 Mon Sep 17 00:00:00 2001 From: Zendy <50132805+zendy199x@users.noreply.github.com> Date: Sat, 28 Mar 2026 22:47:00 +0700 Subject: [PATCH] refactor: potential null dereference in react compiler configuration The babel.config-react-compiler.js file contains a hack comment about Zod spreading values in React Compiler's build artifact. If the baseConfig.plugins array is null or undefined, the assignment `plugins: baseConfig.plugins` will cause a runtime TypeError when the compiler tries to process the configuration. This could crash the build process or cause incorrect transpilation. Signed-off-by: Zendy <50132805+zendy199x@users.noreply.github.com> --- babel.config-react-compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babel.config-react-compiler.js b/babel.config-react-compiler.js index 11fb8c292e39..55d6e2195d86 100644 --- a/babel.config-react-compiler.js +++ b/babel.config-react-compiler.js @@ -15,5 +15,5 @@ const baseConfig = require('./babel.config-ts'); module.exports = { - plugins: baseConfig.plugins, + plugins: Array.isArray(baseConfig.plugins) ? baseConfig.plugins : [], };