Add strict equalities in src/core/obj.js
This commit is contained in:
parent
a154ca2dd3
commit
ee0c0dd8a9
@ -98,12 +98,12 @@ var Dict = (function DictClosure() {
|
|||||||
get: function Dict_get(key1, key2, key3) {
|
get: function Dict_get(key1, key2, key3) {
|
||||||
var value;
|
var value;
|
||||||
var xref = this.xref;
|
var xref = this.xref;
|
||||||
if (typeof (value = this.map[key1]) != 'undefined' || key1 in this.map ||
|
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||||
typeof key2 == 'undefined') {
|
typeof key2 === 'undefined') {
|
||||||
return xref ? xref.fetchIfRef(value) : value;
|
return xref ? xref.fetchIfRef(value) : value;
|
||||||
}
|
}
|
||||||
if (typeof (value = this.map[key2]) != 'undefined' || key2 in this.map ||
|
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||||
typeof key3 == 'undefined') {
|
typeof key3 === 'undefined') {
|
||||||
return xref ? xref.fetchIfRef(value) : value;
|
return xref ? xref.fetchIfRef(value) : value;
|
||||||
}
|
}
|
||||||
value = this.map[key3] || null;
|
value = this.map[key3] || null;
|
||||||
@ -652,7 +652,7 @@ var Catalog = (function CatalogClosure() {
|
|||||||
for (var i = 0; i < kids.length; i++) {
|
for (var i = 0; i < kids.length; i++) {
|
||||||
var kid = kids[i];
|
var kid = kids[i];
|
||||||
assert(isRef(kid), 'kids must be a ref');
|
assert(isRef(kid), 'kids must be a ref');
|
||||||
if (kid.num == kidRef.num) {
|
if (kid.num === kidRef.num) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -976,7 +976,7 @@ var XRef = (function XRefClosure() {
|
|||||||
// finding byte sequence
|
// finding byte sequence
|
||||||
while (offset < dataLength) {
|
while (offset < dataLength) {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
while (i < length && data[offset + i] == what[i]) {
|
while (i < length && data[offset + i] === what[i]) {
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
if (i >= length) {
|
if (i >= length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user