Skip to content

Commit

Permalink
fix concurrent parsing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dherault committed Dec 6, 2016
1 parent d2c6e91 commit 4a25086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Bug fixes:**
- Fix readQuads bug when resolving empty result
- Use Trig Media type with UTF-8 charset for POSTing and PUTing data
- Fix concurrent parsing bug

# 0.1.0

Expand Down
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const request = require('request');
const createRdfParser = require('n3').Parser;

const trigMimeType = 'application/x-trig; charset=utf-8';
const parser = createRdfParser({ format: 'N-Quads' });

/* ----------
UTILS
Expand Down Expand Up @@ -81,8 +80,7 @@ function readQuads(blazegraphUrl, input) {
const quads = [];

if (!nquads) return resolve(quads);

parser.parse(nquads, (error, triple) => {
createRdfParser().parse(nquads, (error, triple) => {
if (error) return reject(error);
if (triple) return quads.push(triple);

Expand Down

0 comments on commit 4a25086

Please sign in to comment.