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) {
|
||||
var value;
|
||||
var xref = this.xref;
|
||||
if (typeof (value = this.map[key1]) != 'undefined' || key1 in this.map ||
|
||||
typeof key2 == 'undefined') {
|
||||
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||
typeof key2 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
if (typeof (value = this.map[key2]) != 'undefined' || key2 in this.map ||
|
||||
typeof key3 == 'undefined') {
|
||||
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||
typeof key3 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
value = this.map[key3] || null;
|
||||
@ -652,7 +652,7 @@ var Catalog = (function CatalogClosure() {
|
||||
for (var i = 0; i < kids.length; i++) {
|
||||
var kid = kids[i];
|
||||
assert(isRef(kid), 'kids must be a ref');
|
||||
if (kid.num == kidRef.num) {
|
||||
if (kid.num === kidRef.num) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@ -976,7 +976,7 @@ var XRef = (function XRefClosure() {
|
||||
// finding byte sequence
|
||||
while (offset < dataLength) {
|
||||
var i = 0;
|
||||
while (i < length && data[offset + i] == what[i]) {
|
||||
while (i < length && data[offset + i] === what[i]) {
|
||||
++i;
|
||||
}
|
||||
if (i >= length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user