We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55c0953 commit a7143faCopy full SHA for a7143fa
index.js
@@ -30,19 +30,11 @@ function stringify(value) {
30
}
31
32
function point(point) {
33
- if (!point || typeof point !== 'object') {
34
- point = {}
35
- }
36
-
37
- return index(point.line) + ':' + index(point.column)
+ return index(point && point.line) + ':' + index(point && point.column)
38
39
40
function position(pos) {
41
- if (!pos || typeof pos !== 'object') {
42
- pos = {}
43
44
45
- return point(pos.start) + '-' + point(pos.end)
+ return point(pos && pos.start) + '-' + point(pos && pos.end)
46
47
48
function index(value) {
0 commit comments