```coffeescript
if $mate.environmentType == "browser"
    global.$mate = $mate
else if $mate.environmentType == "node"
    module.exports = $mate
else
    throw new Error()
```

Fix a browser global bug.
user
```coffeescript
if $mate.environmentType == "browser"
    window.$mate = $mate
else if $mate.environmentType == "node"
    module.exports = $mate
else
    throw new Error()
```
assistant