fix: originalPositionFor return null when using babel-loader

This commit is contained in:
Clark Du 2017-10-30 12:15:25 +08:00
parent 7d2ea44c83
commit 327fabb663
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -413,7 +413,8 @@ export default class Renderer extends Tapable {
// Try to find original position
const { line, column, name, source } = smc.originalPositionFor({
line: frame.getLineNumber() || 0,
column: frame.getColumnNumber() || 0
column: frame.getColumnNumber() || 0,
bias: SourceMapConsumer.LEAST_UPPER_BOUND
})
if (line) {
frame.lineNumber = line