Skip to content

Commit 2d8e759

Browse files
authored
Merge pull request #902 from d3relict/master
fix(webrtc-camera.js): only change shortcuts.innerHTML on difference
2 parents c033e70 + 11f3346 commit 2d8e759

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

custom_components/webrtc/www/webrtc-camera.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,13 @@ class WebRTCCamera extends VideoRTC {
629629
});
630630

631631
this.renderTemplate('shortcuts', () => {
632-
shortcuts.innerHTML = this.config.shortcuts.map((value, index) => `
632+
const innerHTML = this.config.shortcuts.map((value, index) => `
633633
<ha-icon data-index="${index}" icon="${value.icon}" title="${value.name}"></ha-icon>
634634
`).join('');
635+
636+
if (shortcuts.innerHTML !== innerHTML) {
637+
shortcuts.innerHTML = innerHTML;
638+
}
635639
});
636640
}
637641

0 commit comments

Comments
 (0)