0

I have encountered runtime error:

TypeError: this.sourceExpression.connect is not a function

Problem is that stacktrace does not show anything useful, it points (randomly) to the last line of one of bundled components (in this case Leaflet's MarkerClusterGroup):

Uncaught TypeError: this.sourceExpression.connect is not a function at ChildInterpolationBinding.connect (MarkerClusterGroup.Refresh.js:110) at enqueueBindingConnect (MarkerClusterGroup.Refresh.js:110) at ChildInterpolationBinding.bind (MarkerClusterGroup.Refresh.js:110) at View.bind (MarkerClusterGroup.Refresh.js:110) at If._show (MarkerClusterGroup.Refresh.js:110) at If._update (MarkerClusterGroup.Refresh.js:110) at If.conditionChanged (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.selfSubscriber (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.call (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.setValue (MarkerClusterGroup.Refresh.js:110) at If.descriptor.set [as condition] (MarkerClusterGroup.Refresh.js:110) at Object.setValue (MarkerClusterGroup.Refresh.js:110) at Binding.updateTarget (MarkerClusterGroup.Refresh.js:110) at Binding.call (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.callSubscribers (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.call (MarkerClusterGroup.Refresh.js:110)

4

1 回答 1

1

Cause of the issue was not related with file where stack trace was pointing to. Issue was syntax error (double dot: dto..firstName) in binding expression in one of Aurelia templates, something like:

<input value.bind="dto..firstName" />

Template had no relation or dependency to line of code (or even JS library) where stack trace was pointing to.

于 2018-05-09T14:53:24.637 回答