When a consumer option is supplied to motion's createClient, the consumer getter in Client.defaultOptions still gets called during Object.assign, so getFallbackConsumer still gets called and generates an additional ActionCable consumer.
This PR moves consumer presence checking to an explicit statement after Object.assign.
Also improves the logging of Component lifecycle events by attaching the component itself to the logs.
In case it's useful, this console session illustrates the issue with the getter and Object.assign. The getter still gets called even when being overwritten.
When a consumer option is supplied to motion's
createClient
, theconsumer
getter inClient.defaultOptions
still gets called duringObject.assign
, sogetFallbackConsumer
still gets called and generates an additional ActionCable consumer.This PR moves consumer presence checking to an explicit statement after
Object.assign
.Also improves the logging of
Component
lifecycle events by attaching the component itself to the logs.Finally, bumps version to 0.7.1