Skip to content

Commit

Permalink
Added empty wdl string check
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoltsova committed Jan 22, 2018
1 parent 2ab44f0 commit d0acb62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser/parse.js
Expand Up @@ -25,12 +25,14 @@ import parseWDL from './WDL/parse';
* @returns {Promise} Parsing result object
*/
function parse(text, opts = {}) {
if (!text) {
return Promise.reject('No data to parse');
}
const format = opts.format || 'wdl';
const subWfDetailing = (opts.subWfDetailing && _.isArray(opts.subWfDetailing)) ? opts.subWfDetailing : null;
const recursionDepth = opts.recursionDepth || 0;
const baseURI = opts.baseURI || null;
const zipFile = opts.zipFile || null;

if (format === 'wdl') {
if (zipFile) {
return JSZip.loadAsync(zipFile).then((files) => {
Expand Down

0 comments on commit d0acb62

Please sign in to comment.