This is safer:

```js
if (!done) {
    done = function () {};
}
```