@@ -86,12 +86,13 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
86
86
const fileIndex = rawMessage . lastIndexOf ( LogSourceMapService . FILE_PREFIX ) ;
87
87
const deviceProjectPath = util . format ( ANDROID_DEVICE_APP_ROOT_TEMPLATE , projectData . projectIdentifiers . android ) ;
88
88
let message = rawMessage ;
89
+ let separator = "," ;
89
90
let parts , filePath , line , column ;
90
91
91
92
if ( fileIndex >= 0 ) {
92
93
const fileSubstring = rawMessage . substring ( fileIndex + LogSourceMapService . FILE_PREFIX . length ) ;
93
94
//"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
94
- parts = fileSubstring . split ( "," ) ;
95
+ parts = fileSubstring . split ( separator ) ;
95
96
if ( parts . length >= 3 ) {
96
97
// "data/data/org.nativescript.sourceMap/files/app/bundle.js"
97
98
parts [ 0 ] = parts [ 0 ] . replace ( "'" , "" ) ;
@@ -101,7 +102,8 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
101
102
parts [ 2 ] = parts [ 2 ] . replace ( " column: " , "" ) ;
102
103
} else {
103
104
// "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
104
- parts = fileSubstring . split ( ":" ) ;
105
+ separator = ":" ;
106
+ parts = fileSubstring . split ( separator ) ;
105
107
}
106
108
107
109
if ( parts . length >= 3 ) {
@@ -113,7 +115,7 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
113
115
column = parseInt ( parts [ 2 ] ) ;
114
116
message = rawMessage . substring ( 0 , fileIndex ) ;
115
117
for ( let i = 3 ; i < parts . length ; i ++ ) {
116
- message += parts [ i ] ;
118
+ message += ` ${ parts [ i ] } ${ i === ( parts . length - 1 ) ? "" : separator } ` ;
117
119
}
118
120
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
119
121
message = _ . trimEnd ( message , "(" ) ;
@@ -146,7 +148,7 @@ export class LogSourceMapService implements Mobile.ILogSourceMapService {
146
148
147
149
message = rawMessage . substring ( 0 , fileIndex ) . trim ( ) ;
148
150
for ( let i = 3 ; i < parts . length ; i ++ ) {
149
- message += parts [ i ] ;
151
+ message += ` ${ parts [ i ] } ${ i === ( parts . length - 1 ) ? "" : ":" } ` ;
150
152
}
151
153
message = message . trim ( ) ;
152
154
}
0 commit comments