mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 04:16:34 +00:00
Fixes for view url-sync
This commit is contained in:
parent
917f9d8519
commit
485ad9f033
@ -20,7 +20,7 @@
|
||||
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#7d7f8077f5faf201ba9a1133c0a50b19c32bfa1c",
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#eee4f5060fb66327a44ff4f9ecba81d927481e79",
|
||||
"lodash": "^3.10.0",
|
||||
"moment": "^2.11.1"
|
||||
},
|
||||
|
@ -89,7 +89,7 @@ export default new Polymer({
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.serviceWorker.register('./service_worker.js').catch(err => {
|
||||
navigator.serviceWorker.register('/service_worker.js').catch(err => {
|
||||
if (__DEV__) {
|
||||
/* eslint-disable no-console */
|
||||
console.warn('Unable to register service worker', err);
|
||||
|
@ -150,7 +150,10 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
viewSelected(ev) {
|
||||
const section = ev.detail.item.getAttribute('data-entity') || null;
|
||||
this.async(() => viewActions.selectView(section), 0);
|
||||
const view = ev.detail.item.getAttribute('data-entity') || null;
|
||||
const current = this.currentView || null;
|
||||
if (view !== current) {
|
||||
this.async(() => viewActions.selectView(view), 0);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user