mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fix localstorage crashing first launch
This commit is contained in:
parent
3c70480b19
commit
4dc5564992
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user