- return this
- .data('summaryCallback', callback)
- // To prevent duplicate events, the handlers are first removed and then
- // (re-)added.
- .off('formUpdated.summary')
- .on('formUpdated.summary', () => {
- self.trigger('summaryUpdated');
- })
- // The actual summaryUpdated handler doesn't fire when the callback is
- // changed, so we have to do this manually.
- .trigger('summaryUpdated');
+ return (
+ this.data('summaryCallback', callback)
+ // To prevent duplicate events, the handlers are first removed and then
+ // (re-)added.
+ .off('formUpdated.summary')
+ .on('formUpdated.summary', () => {
+ self.trigger('summaryUpdated');
+ })
+ // The actual summaryUpdated handler doesn't fire when the callback is
+ // changed, so we have to do this manually.
+ .trigger('summaryUpdated')
+ );