Optimized RTL check

This commit is contained in:
Yosi Levy 2020-07-19 15:09:34 +03:00
parent d5a947e2cc
commit c6624e5cb6

View File

@ -44,11 +44,6 @@ export class HaDateRangePicker extends LitElement {
const oldHass = changedProps.get("hass") as HomeAssistant | undefined; const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
if (!oldHass || oldHass.language !== this.hass.language) { if (!oldHass || oldHass.language !== this.hass.language) {
this._hour24format = this._compute24hourFormat(); this._hour24format = this._compute24hourFormat();
}
if (
!oldHass ||
computeRTLDirection(oldHass) !== computeRTLDirection(this.hass)
) {
this._rtlDirection = computeRTLDirection(this.hass); this._rtlDirection = computeRTLDirection(this.hass);
} }
} }