Commit 66dac60c355d6002362afd833034c36062a8ce7c
use setTimeout if setImmediate is not available
Dominic Tarr committed on 8/21/2016, 2:46:32 AMParent: aced9005d3a8be64c8d93decc047283d941c6d5e
Files changed
modules/theme.js | changed |
modules/theme.js | ||
---|---|---|
@@ -11,8 +11,10 @@ | ||
11 | 11 | id: '&JFa42U6HtPm9k+s+AmpDIAoTJJI/PzoRC/J/WCfduDY=.sha256', |
12 | 12 | name: 'patchbay-minimal.css' |
13 | 13 | } |
14 | 14 | |
15 | +var next = 'undefined' === typeof setImmediate ? setTimeout : setImmediate | |
16 | + | |
15 | 17 | var link = document.head.appendChild(h('link', {rel: 'stylesheet'})) |
16 | 18 | var activeTheme |
17 | 19 | |
18 | 20 | function useTheme(id) { |
@@ -30,9 +32,9 @@ | ||
30 | 32 | function useSavedTheme() { |
31 | 33 | useTheme(localStorage.themeId || defaultTheme.id) |
32 | 34 | } |
33 | 35 | |
34 | -setImmediate(useSavedTheme) | |
36 | +next(useSavedTheme) | |
35 | 37 | |
36 | 38 | function themes() { |
37 | 39 | return cat([ |
38 | 40 | pull.values([ |
Built with git-ssb-web