Skip to content

Commit d6c09f0

Browse files
committed
Fix variable name mismatches in from() and length() methods
1 parent 7214bb5 commit d6c09f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/query/woqlQuery.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ WOQLQuery.prototype.from = function (graphRef, query) {
425425
// return ['graph', 'query']
426426
if (this.cursor['@type']) this.wrapCursorWithAnd();
427427
this.cursor['@type'] = 'From';
428-
if (!graphRef || typeof graph !== 'string') {
428+
if (!graphRef || typeof graphRef !== 'string') {
429429
return this.parameterError(
430430
'The first parameter to from must be a Graph Filter Expression (string)',
431431
);
@@ -1389,9 +1389,9 @@ WOQLQuery.prototype.length = function (inputVarList, resultVarName) {
13891389
if (this.cursor['@type']) this.wrapCursorWithAnd();
13901390
this.cursor['@type'] = 'Length';
13911391
this.cursor.list = this.cleanDataValue(inputVarList);
1392-
if (typeof vb === 'number') {
1392+
if (typeof resultVarName === 'number') {
13931393
this.cursor.length = this.cleanObject(resultVarName, 'xsd:nonNegativeInteger');
1394-
} else if (typeof vb === 'string') {
1394+
} else if (typeof resultVarName === 'string') {
13951395
this.cursor.length = this.varj(resultVarName);
13961396
}
13971397
return this;

lib/woqlClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ WOQLClient.prototype.query = function (woql, commitMsg, allWitnesses, lastDataVe
667667
const fileName = resourceObject.source.post.split('/').pop();
668668

669669
if (providedResourceInsteadOfFile) {
670-
formData.append("file", new Blob([providedResourceInsteadOfFile], { type: "application/csv" }), fileName)
670+
formData.append('file', Buffer.from(providedResourceInsteadOfFile), { filename: fileName, contentType: 'application/csv' });
671671
} else {
672672
formData.append('file', fs.createReadStream(resourceObject.source.post));
673673
}

0 commit comments

Comments
 (0)