Fix localstorage crashing first launch

This commit is contained in:
Gregory Schier 2016-08-03 09:35:43 -07:00
parent 3c70480b19
commit 4dc5564992
2 changed files with 4 additions and 3 deletions

View File

@ -11,8 +11,6 @@ const appVersion = require('./app.json').version;
const {app, dialog, ipcMain, autoUpdater, Menu, BrowserWindow, webContents} = electron;
const {LocalStorage} = require('node-localstorage');
const localStorage = new LocalStorage(path.join(app.getPath('userData'), 'localStorage'));
const IS_DEV = process.env.NODE_ENV === 'development';
const IS_MAC = process.platform === 'darwin';
const IS_WIN = process.platform === 'win32';
@ -25,6 +23,7 @@ const UPDATE_URLS = {
};
let mainWindow = null;
let localStorage = null;
// Enable this for CSS grid layout :)
app.commandLine.appendSwitch('enable-experimental-web-platform-features');
@ -119,6 +118,8 @@ app.on('window-all-closed', () => {
});
app.on('ready', () => {
localStorage = new LocalStorage(path.join(app.getPath('userData'), 'localStorage'));
const zoomFactor = getZoomFactor();
const bounds = getBounds();
const {x, y, width, height} = bounds;

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "insomnia",
"version": "3.0.15",
"version": "3.0.16",
"productName": "Insomnia",
"longName": "Insomnia HTTP Client",
"description": "The best REST API Client",