Skip to content

Commit

Permalink
Fix code style for JS
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 17, 2024
1 parent 42decc3 commit 626f8fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/webrtc/www/webrtc-camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,16 +605,16 @@ class WebRTCCamera extends VideoRTC {
const shortcuts = this.querySelector('.shortcuts');
shortcuts.addEventListener('click', ev => {
const value = services[ev.target.dataset.index];
if(value.more_info !== undefined) {
if (value.more_info !== undefined) {
const event = new Event('hass-more-info', {
bubbles: true,
cancelable: true,
composed: true,
});
event.detail = { entityId: value.more_info };
event.detail = {entityId: value.more_info};
ev.target.dispatchEvent(event);
}
if(value.service !== undefined) {
if (value.service !== undefined) {
const [domain, name] = value.service.split('.');
this.hass.callService(domain, name, value.service_data || {});
}
Expand Down

0 comments on commit 626f8fe

Please sign in to comment.