you could replace it with:

```
duration && __finite(duration) ? t/duration: 0
```