Skip to content

Commit 77a8ce7

Browse files
committed
fix: source-map appPath prefix detection
1 parent 65dcf01 commit 77a8ce7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/services/log-source-map-service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
203203
originalPosition.source.replace("webpack:///", "");
204204
if (sourceFile) {
205205
const appPath = projectData.getAppDirectoryRelativePath();
206-
if (!_.startsWith(sourceFile, NODE_MODULES_FOLDER_NAME) && !_.startsWith(sourceFile, appPath)) {
207-
sourceFile = path.join(
208-
appPath,
209-
sourceFile
210-
);
206+
if (
207+
!_.startsWith(sourceFile, NODE_MODULES_FOLDER_NAME) &&
208+
!_.startsWith(sourceFile, appPath + "/")
209+
) {
210+
sourceFile = path.join(appPath, sourceFile);
211211
}
212212

213213
sourceFile = stringReplaceAll(sourceFile, "/", path.sep);

0 commit comments

Comments
 (0)