NervJS/nerv

nerv-server error: navigator is not defined

i-like-robots opened this issue · 0 comments

When attempting to use nerv-server v1.3.12 in a Node environment it throws immediately:

require('nerv-server')
// throws ReferenceError: navigator is not defined

The issue is being thrown by the following line:

const isMacSafari = navigator && navigator.platform &&
/mac/i.test(navigator.platform) && /^((?!chrome|android).)*safari/i.test(navigator.userAgent)

Removing this function (it does not appear to be used) resolves the issue.