5
wbhob
8y

if (thingYouNeed.exists == false)
developer.make(thingYouNeed,
function(err,success) {
if(!err) thingYouNeed.exists = true;
})

Comments
  • 2
    If you can call "exists" on thingYouNeed, then it must not be null, so it exists and thingYouNeed.exists will always return true?
  • 1
    I meant thing.idea in line 3 I guess because thingYouNeed would have an idea property @alfer
  • 2
    @Alfer @wbhob if(!exists(thingYouNeed))
Add Comment