mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-29 04:37:22 +00:00
Use localStorage with Web Storage API (#23172)
This commit is contained in:
@@ -487,13 +487,15 @@ export class HaScriptTrace extends LitElement {
|
||||
if (!traceText) {
|
||||
return;
|
||||
}
|
||||
localStorage.devTrace = traceText;
|
||||
|
||||
window.localStorage.setItem("devTrace", traceText);
|
||||
this._loadLocalTrace(traceText);
|
||||
}
|
||||
|
||||
private _loadLocalStorageTrace() {
|
||||
if (localStorage.devTrace) {
|
||||
this._loadLocalTrace(localStorage.devTrace);
|
||||
const devTrace = window.localStorage.getItem("devTrace");
|
||||
if (devTrace) {
|
||||
this._loadLocalTrace(devTrace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user