cloudflare / node-cloudflare

Node.js API for Client API
https://cloudflare.github.io/node-cloudflare/
Other
335 stars 92 forks source link

fixed bug where entire application would fail, in cases where process.versions is undefined #73

Closed Xayer closed 4 years ago

Xayer commented 4 years ago

In web applications such as Vue.js, process.versions is not available. This causes the entire application to crash. Here's an easy fix, but feel free to suggest a better solution.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 87.597% when pulling b31ea74f1146131597483a3cbb00f8b14c6b6a18 on Xayer:master into 41568a5f7d83c58924393ab0219466e2611ada56 on cloudflare:master.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 87.597% when pulling b31ea74f1146131597483a3cbb00f8b14c6b6a18 on Xayer:master into 41568a5f7d83c58924393ab0219466e2611ada56 on cloudflare:master.

terinjokes commented 4 years ago

What environment is this?

Xayer commented 4 years ago

What environment is this?

node 8, 10 and 12 running a vue app in development mode.

terinjokes commented 4 years ago

This package doesn't support the browser, as there's a CORS policy preventing API access.

Xayer commented 4 years ago

:disappointed: