Closed chiefcll closed 3 years ago
In what situation have you run into the case where obj
equals null
?
const queryParams = new window.URLSearchParams(document.location.search); const myValue = queryParams.get('blah')) // returns null
So any url params not defined are null
const platformSettings = {
languageCode: queryParams.get('language'),
countryCode: queryParams.get('locale'),
}
Got it. That's a case we haven't ran into because we usually avoid null
values like this and use defaults instead. But I guess it's a valid use case to pass this logic down to the App code. Should be a small fix.
https://github.com/rdkcentral/Lightning-SDK/blob/779e85aff338f812b411ab4cbcd7fe2fd7a1b9bd/src/Settings/index.js#L38
Doesn't check for null which is an object