(#2543) - fix call stack exceeded err

I'll write a PR to demonstrate that https://github.com/pouchdb/pouchdb-extend/pull/2 actually fixes this error.