This should be able to be simplified to:

```javascript
if(promises) {
  return promise
}

return self.nodes.render(context)
```