Skip to content

Commit

Permalink
Fixes #941
Browse files Browse the repository at this point in the history
  • Loading branch information
huv1k committed Jan 28, 2019
1 parent c01bb7a commit 1b2af1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
@@ -1,5 +1,5 @@
import { createSelector } from 'reselect'
import { makeWorkspace, getSettingsString } from '../workspace/reducers'
import { makeWorkspace } from '../workspace/reducers'

function getSelectedWorkspaceId(state) {
return state.get('selectedWorkspace')
Expand Down Expand Up @@ -86,7 +86,11 @@ export const getDocExplorerWidth = makeSessionSelector('docExplorerWidth')
export const getNextQueryStartTime = makeSessionSelector('nextQueryStartTime')
export const getTracingSupported = makeSessionSelector('tracingSupported')

export const getTabWidth = createSelector([getSettingsString], settings => {
function getSettings(state) {
return state.getIn(['settingsString'])
}

export const getTabWidth = createSelector([getSettings], settings => {
try {
const json = JSON.parse(settings)
return json['prettier.tabWidth'] || 2
Expand All @@ -96,7 +100,8 @@ export const getTabWidth = createSelector([getSettingsString], settings => {

return 2
})
export const getUseTabs = createSelector([getSettingsString], settings => {

export const getUseTabs = createSelector([getSettings], settings => {
try {
const json = JSON.parse(settings)
return json['prettier.useTabs'] || false
Expand Down
Expand Up @@ -53,7 +53,7 @@ export const defaultSettings: ISettings = {
'request.credentials': 'omit',
'schema.disableComments': true,
'schema.enablePolling': true,
'tracing.hideTracingResponse': true,
'tracing.hideTracingResponse': true,
}

// tslint:disable-next-line:max-classes-per-file
Expand Down

0 comments on commit 1b2af1c

Please sign in to comment.