Any time the constraints of normalizeChannel() are violated it returns
undefined, which is rarely what we want.
This commit changes the behavior so that channels that can't be
normalized return null, and channels that are too long become
truncated. This should lower the prevelance of #undefined in
user-facing applications.
Any time the constraints of
normalizeChannel()
are violated it returnsundefined
, which is rarely what we want.This commit changes the behavior so that channels that can't be normalized return
null
, and channels that are too long become truncated. This should lower the prevelance of#undefined
in user-facing applications.See-also: https://github.com/ssb-js/ssb-ref/pull/33