Skip to content

Commit 7322b21

Browse files
committed
fix: unknownApp name for Expo apps
1 parent c32a344 commit 7322b21

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/react-native-bundle-visualizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { explore } = require('source-map-explorer');
1010
const pkgJSON = JSON.parse(fs.readFileSync('./package.json'));
1111

1212
function sanitizeString(str) {
13-
return str.replace(/[^\w]/gi, '');
13+
return str ? str.replace(/[^\w]/gi, '') : str;
1414
}
1515

1616
function getAppName() {

test/Expo35/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"expo": {
3-
"name": "Bundle Visualizer",
3+
"name": "Expo35",
44
"slug": "Expo35",
55
"privacy": "public",
66
"sdkVersion": "36.0.0",

test/Expo42/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"expo": {
3-
"name": "Bundle Visualizer",
3+
"name": "Expo42",
44
"slug": "Expo42",
55
"version": "1.0.0",
66
"orientation": "portrait",

0 commit comments

Comments
 (0)