Within lib/citeproc.js:8909 there is a line of code that looks like:
} else if ("object" === typeof Item[variable]) {
if (Item[variable].length) {
}
break;
}
I am unsure why the embedded if statement exists as it doesn't look to be doing anything. I believe when a title is missing this causes a HTTP 500 error message to occur (Item[variable] returns a null). If possible I will attempt to provide the HTTP request that causes this problem.
ERR! Error while handling request: TypeError: Cannot read property 'length' of null
ERR! Error while handling request: at func (/home/mark/workspace/citeproc/lib/citeproc.js:8908:39)
ERR! Error while handling request: at CSL.tokenExec (/home/mark/workspace/citeproc/lib/citeproc.js:749:26)
ERR! Error while handling request: at CSL.getCite (/home/mark/workspace/citeproc/lib/citeproc.js:3989:30)
ERR! Error while handling request: at CSL.getBibliographyEntries (/home/mark/workspace/citeproc/lib/citeproc.js:4324:50)
ERR! Error while handling request: at CSL.Engine.makeBibliography (/home/mark/workspace/citeproc/lib/citeproc.js:4140:38)
ERR! Error while handling request: at Promise.resolve.then.then.then.catch.msg (/home/mark/workspace/citeproc/lib/citeServer.js:288:48)
ERR! Error while handling request: at tryCatch1 (/home/mark/workspace/citeproc/node_modules/bluebird/js/main/util.js:64:19)
ERR! Error while handling request: at Promise$_callHandler [as _callHandler] (/home/mark/workspace/citeproc/node_modules/bluebird/js/main/promise.js:706:13)
ERR! Error while handling request: at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/home/mark/workspace/citeproc/node_modules/bluebird/js/main/promise.js:722:18)
ERR! Error while handling request: at Promise$_settlePromiseAt [as _settlePromiseAt] (/home/mark/workspace/citeproc/node_modules/bluebird/js/main/promise.js:892:14)
ERR! Error while handling request: [TypeError: Cannot read property 'length' of null]
Within
lib/citeproc.js:8909
there is a line of code that looks like:I am unsure why the embedded if statement exists as it doesn't look to be doing anything. I believe when a title is missing this causes a HTTP 500 error message to occur (
Item[variable]
returns a null). If possible I will attempt to provide the HTTP request that causes this problem.