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:
Tyler Renelle
2013-05-25 19:34:45 +01:00
parent 51a80b6626
commit 002d4f9541
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -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 = {}