bito-code-review[bot] commented on code in PR #43686:
URL: https://github.com/apache/superset/pull/43686#discussion_r3887256082
##########
superset-frontend/scripts/check-storybook-coverage.js:
##########
@@ -150,7 +153,10 @@ function main() {
for (const componentDir of componentDirs) {
const fullPath = path.join(ROOT, componentDir);
- if (!fs.existsSync(fullPath) || !fs.statSync(fullPath).isDirectory())
+ if (
+ !fs.existsglob.sync(fullPath) ||
+ !fs.statglob.sync(fullPath).isDirectory()
+ )
continue;
Review Comment:
<!-- Bito Reply -->
The suggestion is correct and improves the code by replacing non-existent
`fs` methods with the standard `fs.existsSync` and `fs.statSync` functions.
Applying this change will resolve the runtime error caused by the invalid
method calls.
**superset-frontend/scripts/check-storybook-coverage.js**
```
for (const componentDir of componentDirs) {
const fullPath = path.join(ROOT, componentDir);
if (
!fs.existsSync(fullPath) ||
!fs.statSync(fullPath).isDirectory()
)
continue;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]