rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

Fix named route property not being accessed properly #317

Closed MLangendijk closed 2 years ago

MLangendijk commented 2 years ago

This is a fix for the Named Route navigation paradigm as documented here: https://lightningjs.io/docs/#/lightning-sdk-reference/plugins/router/navigation?id=named-routes

The fix adds a getter method on the Route model for the name property. The getRouteByName function in the route utils checks for the name property to retrieve the correct route. Since this property wasn't available on the model, it would never find the correct route and never execute any. Reference: https://github.com/rdkcentral/Lightning-SDK/blob/dev/src/Router/utils/route.js#L240

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

MLangendijk commented 2 years ago

@michielvandergeest I somehow can't add reviewers; I'm assuming this needs to be reviewed though?

michielvandergeest commented 2 years ago

Hi @MLangendijk, thanks for your contribution! Yeah, I'll make sure this get's properly reviewed and tested this week so we can merge and release it if all is good.

sandeep-vedam commented 2 years ago

Hey @MLangendijk , We’ve validated the fix you have provided and it looks good. We will merge it and release it with the next release

MLangendijk commented 2 years ago

Hey @MLangendijk , We’ve validated the fix you have provided and it looks good. We will merge it and release it with the next release

Thanks for the update!