Skip to content

Commit

Permalink
fix: source-map appPath prefix detection
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Sep 30, 2021
1 parent 65dcf01 commit 77a8ce7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/services/log-source-map-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
originalPosition.source.replace("webpack:///", "");
if (sourceFile) {
const appPath = projectData.getAppDirectoryRelativePath();
if (!_.startsWith(sourceFile, NODE_MODULES_FOLDER_NAME) && !_.startsWith(sourceFile, appPath)) {
sourceFile = path.join(
appPath,
sourceFile
);
if (
!_.startsWith(sourceFile, NODE_MODULES_FOLDER_NAME) &&
!_.startsWith(sourceFile, appPath + "/")
) {
sourceFile = path.join(appPath, sourceFile);
}

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

0 comments on commit 77a8ce7

Please sign in to comment.