diff --git a/src/utils/location.js b/src/utils/location.js index 33c6e27a8f..2e4ea9b2f5 100644 --- a/src/utils/location.js +++ b/src/utils/location.js @@ -15,14 +15,14 @@ type IncompleteLocation = { export function createLocation({ sourceId, - line, + line = 1, column, - sourceUrl + sourceUrl = "" }: IncompleteLocation): SourceLocation { return { sourceId, - line: line || 0, + line, column, - sourceUrl: sourceUrl || "" + sourceUrl }; }