mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 07:38:07 +02:00
[api-major] Change getJavaScript
to return null
, rather than an empty Array, when no JavaScript exists
Other API methods already return `null`, rather than empty Arrays/Objects, hence it makes sense to change `getJavaScript` to be consistent.
This commit is contained in:
parent
4fdb0f57d7
commit
1cd1582cb9
4 changed files with 16 additions and 8 deletions
|
@ -684,7 +684,7 @@ describe('api', function() {
|
|||
it('gets javascript', function(done) {
|
||||
var promise = doc.getJavaScript();
|
||||
promise.then(function (data) {
|
||||
expect(data).toEqual([]);
|
||||
expect(data).toEqual(null);
|
||||
done();
|
||||
}).catch(function (reason) {
|
||||
done.fail(reason);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue