зеркало из https://github.com/mozilla/brackets.git
Merge pull request #364 from humphd/thimble-issue590-followup
Don't warn if theme or preview mode are null
This commit is contained in:
Коммит
82433a0fd0
|
@ -65,25 +65,29 @@ define(function (require, exports, module) {
|
|||
*/
|
||||
function restoreState() {
|
||||
var theme = BrambleStartupState.ui("theme");
|
||||
switch(theme) {
|
||||
case "light-theme":
|
||||
case "dark-theme":
|
||||
Theme.setTheme(theme);
|
||||
break;
|
||||
default:
|
||||
console.warn("[Bramble] unknown theme: `" + theme + "`");
|
||||
if(theme) {
|
||||
switch(theme) {
|
||||
case "light-theme":
|
||||
case "dark-theme":
|
||||
Theme.setTheme(theme);
|
||||
break;
|
||||
default:
|
||||
console.warn("[Bramble] unknown theme: `" + theme + "`");
|
||||
}
|
||||
}
|
||||
|
||||
var previewMode = BrambleStartupState.ui("previewMode");
|
||||
switch(previewMode) {
|
||||
case "desktop":
|
||||
showDesktopView();
|
||||
break;
|
||||
case "mobile":
|
||||
showMobileView();
|
||||
break;
|
||||
default:
|
||||
console.warn("[Bramble] unknown preview mode: `" + previewMode + "`");
|
||||
if(previewMode) {
|
||||
switch(previewMode) {
|
||||
case "desktop":
|
||||
showDesktopView();
|
||||
break;
|
||||
case "mobile":
|
||||
showMobileView();
|
||||
break;
|
||||
default:
|
||||
console.warn("[Bramble] unknown preview mode: `" + previewMode + "`");
|
||||
}
|
||||
}
|
||||
|
||||
var sidebarWidth = BrambleStartupState.ui("sidebarWidth");
|
||||
|
|
Загрузка…
Ссылка в новой задаче