Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot dump to a string #67

Open
group131 opened this issue Aug 11, 2017 · 0 comments
Open

Cannot dump to a string #67

group131 opened this issue Aug 11, 2017 · 0 comments

Comments

@group131
Copy link

Hello, I'm trying to implement the "If you aren't using Browserify, then you can download MemoryStream from https://wzrd.in/standalone/memorystream@latest and it will be available as window.memorystream." scenario.

My function is:

function dump() {
var stream = window.MemoryStream;

var dumpedString = '';
stream.on('data', function(chunk) {
dumpedString += chunk.toString();
});

db.dump(stream).then(function () {
console.log('Yay, I have a dumpedString: ' + dumpedString);
}).catch(function (err) {
console.log('oh no an error', err);
});
}

I get:

scripts.js:25 Uncaught TypeError: Cannot read property 'on' of undefined
at dump (scripts.js:25)
at HTMLDocument. (scripts.js:17)
at j (jQuery-2.1.4.min.js:2)
at Object.fireWith [as resolveWith] (jQuery-2.1.4.min.js:2)
at Function.ready (jQuery-2.1.4.min.js:2)
at HTMLDocument.I (jQuery-2.1.4.min.js:2)

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant