Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

TypeError: value.toArrayBuffer is not a function #50

Closed
timkuijsten opened this issue Jan 16, 2016 · 2 comments
Closed

TypeError: value.toArrayBuffer is not a function #50

timkuijsten opened this issue Jan 16, 2016 · 2 comments

Comments

@timkuijsten
Copy link

I'm running into the exception that toArrayBuffer is not a method of value on line #68. I wonder if this code in #L67-L68 is correct and what the purpose of it is? I really have no clue, for now I just disabled #L67-L69 and "It works for me".

timkuijsten pushed a commit to timkuijsten/level.js that referenced this issue Jan 16, 2016
@nolanlawson
Copy link
Contributor

Hm, the point of that line is that IndexedDB supposedly accepts Uint8Array objects, but not "Buffer" objects (which are a shim for the Node.js "Buffer" object). If you can provide a test case to reproduce and let us know which browser it failed in, that would be helpful. :)

@timkuijsten
Copy link
Author

I've written a new approach where native types are supported if asBuffer is false. I'm interested in feedback on it, see #46.

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

No branches or pull requests

2 participants