aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Shaked2020-04-09 00:21:42 +0300
committerUri Shaked2020-04-09 00:21:42 +0300
commit827dcc890162e97c55e335a4c3ff3fffbd57b1d2 (patch)
tree317cb945054d85bbd2ed08c836ece65917fdf0d4
parentfeat(instruction): implement EICALL, EIJMP #31 (diff)
downloadavr8js-827dcc890162e97c55e335a4c3ff3fffbd57b1d2.tar.gz
avr8js-827dcc890162e97c55e335a4c3ff3fffbd57b1d2.tar.bz2
avr8js-827dcc890162e97c55e335a4c3ff3fffbd57b1d2.zip
style(demo): formatting, lint issue
Diffstat (limited to '')
-rw-r--r--demo/src/utils/editor-history.util.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/demo/src/utils/editor-history.util.ts b/demo/src/utils/editor-history.util.ts
index 65ca38a..023a698 100644
--- a/demo/src/utils/editor-history.util.ts
+++ b/demo/src/utils/editor-history.util.ts
@@ -1,20 +1,26 @@
const AVRJS8_EDITOR_HISTORY = 'AVRJS8_EDITOR_HISTORY';
export class EditorHistoryUtil {
- static hasLocalStorage: boolean = !!window.localStorage;
+ static hasLocalStorage = !!window.localStorage;
static storeSnippet(codeSnippet: string) {
- if (!EditorHistoryUtil.hasLocalStorage) return;
+ if (!EditorHistoryUtil.hasLocalStorage) {
+ return;
+ }
window.localStorage.setItem(AVRJS8_EDITOR_HISTORY, codeSnippet);
}
static clearSnippet() {
- if (!EditorHistoryUtil.hasLocalStorage) return;
+ if (!EditorHistoryUtil.hasLocalStorage) {
+ return;
+ }
localStorage.removeItem(AVRJS8_EDITOR_HISTORY);
}
static getValue() {
- if (!EditorHistoryUtil.hasLocalStorage) return;
+ if (!EditorHistoryUtil.hasLocalStorage) {
+ return;
+ }
return localStorage.getItem(AVRJS8_EDITOR_HISTORY);
}
}