knockout/knockout — pull request #1042 by Valloric (2013-07-18 18:30:31+00:00)
Title: Check subscription truthy before calling dispose()

A TypeErorr is thrown when _subscriptionsToDependencies is an empty array
because splice() will return undefined on which the old code would try to call
dispose(). So we first ensure the subscription is valid before making the call.

Fixes #1041