File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,28 @@ function Exception(message, node) {
19
19
this [ errorProps [ idx ] ] = tmp [ errorProps [ idx ] ] ;
20
20
}
21
21
22
+ /* istanbul ignore else */
22
23
if ( Error . captureStackTrace ) {
23
24
Error . captureStackTrace ( this , Exception ) ;
24
25
}
25
26
26
- if ( loc ) {
27
- this . lineNumber = line ;
28
- this . column = column ;
27
+ try {
28
+ if ( loc ) {
29
+ this . lineNumber = line ;
30
+
31
+ // Work around issue under safari where we can't directly set the column value
32
+ /* istanbul ignore next */
33
+ if ( Object . defineProperty ) {
34
+ Object . defineProperty ( this , 'column' , {
35
+ value : column ,
36
+ enumerable : true
37
+ } ) ;
38
+ } else {
39
+ this . column = column ;
40
+ }
41
+ }
42
+ } catch ( nop ) {
43
+ /* Ignore if the browser is very particular */
29
44
}
30
45
}
31
46
You can’t perform that action at this time.
0 commit comments