parent
217bd36abc
commit
10ec165f14
@ -82,7 +82,11 @@ class TextSourceRange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
equals(other) {
|
equals(other) {
|
||||||
if (other === null) {
|
if (!(
|
||||||
|
typeof other === 'object' &&
|
||||||
|
other !== null &&
|
||||||
|
other instanceof TextSourceRange
|
||||||
|
)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.imposterSourceElement !== null) {
|
if (this.imposterSourceElement !== null) {
|
||||||
@ -409,6 +413,12 @@ class TextSourceElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
equals(other) {
|
equals(other) {
|
||||||
return other && other.element === this.element && other.content === this.content;
|
return (
|
||||||
|
typeof other === 'object' &&
|
||||||
|
other !== null &&
|
||||||
|
other instanceof TextSourceElement &&
|
||||||
|
other.element === this.element &&
|
||||||
|
other.content === this.content
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user