mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Fix isDict when type is missing in dictionary.
This commit is contained in:
parent
2ccad4ca45
commit
a79f005527
2 changed files with 21 additions and 1 deletions
|
@ -63,5 +63,18 @@ describe('util', function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe('isDict', function() {
|
||||
it('handles empty dictionaries with type check', function() {
|
||||
var dict = new Dict();
|
||||
expect(isDict(dict, 'Page')).toEqual(false);
|
||||
});
|
||||
|
||||
it('handles dictionaries with type check', function() {
|
||||
var dict = new Dict();
|
||||
dict.set('Type', new Name('Page'));
|
||||
expect(isDict(dict, 'Page')).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue