Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/js/theme-toggle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
(function() {
'use strict';

const STORAGE_KEY = 'mongoose-theme';
const CODE_THEME_CLASS = 'code-theme-dark';
const supportsMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia === 'function';
Expand All @@ -20,7 +19,8 @@
if (!skipSetStorage) {
try {
localStorage.setItem(STORAGE_KEY, theme);
} catch (e) {
// eslint-disable-next-line no-unused-vars
} catch (err) {
// Silently fail - theme will still work for current session
}
}
Expand Down