File tree Expand file tree Collapse file tree
packages/dev-server/src/plugins/symbolicate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,17 +162,23 @@ export class Symbolicator {
162162 } ;
163163 }
164164
165- const lookup = consumer . originalPositionFor ( {
165+ let lookup = consumer . originalPositionFor ( {
166166 line : frame . lineNumber ,
167167 column : frame . column ,
168168 bias : SourceMapConsumer . LEAST_UPPER_BOUND ,
169169 } ) ;
170170
171- // If lookup fails, we get the same shape object, but with
172- // all values set to null
173171 if ( ! lookup . source ) {
174- // It is better to gracefully return the original frame
175- // than to throw an exception
172+ // fallback to GREATEST_LOWER_BOUND
173+ lookup = consumer . originalPositionFor ( {
174+ line : frame . lineNumber ,
175+ column : frame . column ,
176+ bias : SourceMapConsumer . GREATEST_LOWER_BOUND ,
177+ } ) ;
178+ }
179+
180+ // return the original frame when both lookups fail
181+ if ( ! lookup . source ) {
176182 return {
177183 ...frame ,
178184 collapse : false ,
You can’t perform that action at this time.
0 commit comments