very strange bug here. If called form the API, require() statements
sometimes return blank objects, but only when required from within habitrpg-shared - i can require the files directly from the API just fine. Doesn't help however since habitrpg-shared has dependencies on itself. @yangit any thoughts?
This commit is contained in:
+3
-1
@@ -1,10 +1,12 @@
|
||||
moment = require('moment')
|
||||
_ = require('lodash')
|
||||
|
||||
helpers = require('./helpers.coffee')
|
||||
items = require('./items.coffee')
|
||||
{pets, hatchingPotions} = items.items
|
||||
|
||||
# Very strange bug where `require(./script/helpers.coffee)` is returning a blank object under certain circumsntances I haven't yet figured out
|
||||
helpers = require('habitrpg-shared/script/helpers') if _.isEmpty(helpers)
|
||||
|
||||
XP = 15
|
||||
HP = 2
|
||||
obj = module.exports = {}
|
||||
|
||||
Reference in New Issue
Block a user