mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +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
|
@ -574,10 +574,10 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
|
|||
return this.transport.getAttachments();
|
||||
},
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with an array of all the
|
||||
* JavaScript strings in the name tree.
|
||||
* @return {Promise} A promise that is resolved with an {Array} of all the
|
||||
* JavaScript strings in the name tree, or `null` if no JavaScript exists.
|
||||
*/
|
||||
getJavaScript: function PDFDocumentProxy_getJavaScript() {
|
||||
getJavaScript() {
|
||||
return this.transport.getJavaScript();
|
||||
},
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue