You should flip the conditional:

```js
if (!source)
  return target
/* ... rest of the function ... */
```