shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 20 forks source link

variable existence not verified before usage #124

Closed speedupmate closed 1 year ago

speedupmate commented 1 year ago

https://github.com/shipperhq/module-shipper/blob/7bd3c214d220b6d42b62e00b02113111c259c19c/src/view/frontend/web/template/billing-address/details.html#L14

hitting this with address not having a street value will generate a error

knockout.js:3381 Uncaught TypeError: Unable to process binding "text: function(){return (currentBillingAddress().street).join(', ') }"
Message: Cannot read properties of undefined (reading 'join')
    at text (eval at createBindingsStringEvaluator (knockout.js:2982:16), <anonymous>:3:97)
    at update (knockout.js:4659:42)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373:33)
    at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173:103)
    at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140:29)
    at Function.evaluateImmediate (knockout.js:2101:28)
    at ko.computed.ko.dependentObservable (knockout.js:1954:28)
    at knockout.js:3371:28
    at Object.arrayForEach (knockout.js:159:17)
    at applyBindingsToNodeInternal (knockout.js:3343:22)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:3223:37)
    at applyBindingsToDescendantsInternal (knockout.js:3205:13)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:3232:13)
    at applyBindingsToDescendantsInternal (knockout.js:3205:13)
    at ko.applyBindingsToDescendants (knockout.js:3421:13)
    at ko.computed.disposeWhenNodeIsRemoved (knockout.js:4397:28)

also refer to https://github.com/shipperhq/module-shipper/issues/101 https://github.com/magento/magento2/issues/33826

ibraheemnabeelfauzi commented 1 year ago

Hey @speedupmate thank you for the details above! We'll look into this!

Cheers!

wsajosh commented 1 year ago

Thanks for raising this issue. It has been resolved in the latest release - 20.50.2