module-shipper icon indicating copy to clipboard operation
module-shipper copied to clipboard

variable existence not verified before usage

Open speedupmate opened this issue 4 years ago • 2 comments

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

speedupmate avatar Aug 06 '22 20:08 speedupmate

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

Cheers!

ibraheemnabeelfauzi avatar Aug 08 '22 22:08 ibraheemnabeelfauzi

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

wsajosh avatar Aug 30 '22 09:08 wsajosh