Handle promises passed to defer.resolve()
Documentation