Merge pull request #2864 from antlr/fix-javascript-NPE

Fix a NPE
This commit is contained in:
Terence Parr 2020-07-12 09:27:34 -07:00 committed by GitHub
commit eb1adaa8a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -66,11 +66,11 @@ String.prototype.hashCode = function () {
};
function standardEqualsFunction(a, b) {
return a.equals(b);
return a ? a.equals(b) : a==b;
}
function standardHashCodeFunction(a) {
return a.hashCode();
return a ? a.hashCode() : -1;
}
class Set {