Skip to content

Conversation

FloorLamp
Copy link
Contributor

No description provided.

@FloorLamp FloorLamp requested a review from wanderer April 5, 2018 17:34
@coveralls
Copy link

coveralls commented Apr 5, 2018

Coverage Status

Coverage decreased (-1.1%) to 98.899% when pulling eb2b91e on remote-datastore into ccf8f0f on master.

return await super.get(link)
} catch (e) {}

if (this.remoteOpts.uri) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should go inside the catch so that the control flow is more explicit

@@ -0,0 +1,52 @@
const Buffer = require('safe-buffer').Buffer
const TreeDAG = require('./datastore.js')
const fetch = typeof window !== 'undefined' ? window.fetch : require('node-fetch')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add the following to package.json? or does this break how you build?

"browser": {
    "node-fetch": "./fetch.js"
  }

where fetch.js would just be

module.exports = window.fetch

@wanderer wanderer merged commit 523fd9b into master Apr 5, 2018
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

Successfully merging this pull request may close these issues.

3 participants