Skip to content

Revert RTL PR#1975

Merged
balloob merged 2 commits intodevfrom
RTL-fix-beta
Nov 3, 2018
Merged

Revert RTL PR#1975
balloob merged 2 commits intodevfrom
RTL-fix-beta

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

@zsarnett zsarnett commented Nov 3, 2018

Reverts #1966

Fixes:

018-11-03 12:13:19 ERROR (MainThread) [frontend.js.latest.201811030] https://bla.duckdns.org/frontend_latest/app-b743c825.js:89:305 Uncaught TypeError: Cannot read property 'isRTL' of undefined

@ghost ghost assigned zsarnett Nov 3, 2018
@ghost ghost added the in progress label Nov 3, 2018
@balloob balloob added this to the 20181103.1 milestone Nov 3, 2018
@balloob balloob merged commit f489d88 into dev Nov 3, 2018
@balloob balloob deleted the RTL-fix-beta branch November 3, 2018 18:15
@ghost ghost removed the in progress label Nov 3, 2018
balloob pushed a commit that referenced this pull request Nov 3, 2018
* Revert RTL PR

* Missed this change
@rhayun
Copy link
Copy Markdown
Contributor

rhayun commented Nov 4, 2018

can someone help and try to tell me why this error? i cant see it in my dev space

computeRTL(hass) {
    var lang = this.hass.selectedLanguage || this.hass.language;
    return hass.translationMetadata.translations[lang].isRTL || false;
  }

why its said
Uncaught TypeError: Cannot read property 'isRTL' of undefined

if i adding || false?

@balloob
Copy link
Copy Markdown
Member

balloob commented Nov 4, 2018

if lang doesn't exist as a key on translations, the resulting object is undefined. Calling undefined.isRTL is an error.

@rhayun
Copy link
Copy Markdown
Contributor

rhayun commented Nov 5, 2018

if lang doesn't exist as a key on translations, the resulting object is undefined. Calling undefined.isRTL is an error.

how its possible? can someone choose language that doesnt exists in in translations?
if so i can test it before call isRTL

@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants