fix: use resolveBackend instead of currentBackend (#3514)
This commit is contained in:
parent
a1bf86e856
commit
ea41b98324
@ -4,7 +4,7 @@ import { applyDefaults, detectProxyServer, handleLocalBackend } from '../config'
|
||||
jest.spyOn(console, 'log').mockImplementation(() => {});
|
||||
jest.mock('coreSrc/backend', () => {
|
||||
return {
|
||||
currentBackend: jest.fn(() => ({ isGitBackend: jest.fn(() => true) })),
|
||||
resolveBackend: jest.fn(() => ({ isGitBackend: jest.fn(() => true) })),
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { authenticateUser } from 'Actions/auth';
|
||||
import * as publishModes from 'Constants/publishModes';
|
||||
import { validateConfig } from 'Constants/configSchema';
|
||||
import { selectDefaultSortableFields } from '../reducers/collections';
|
||||
import { currentBackend } from 'coreSrc/backend';
|
||||
import { resolveBackend } from 'coreSrc/backend';
|
||||
|
||||
export const CONFIG_REQUEST = 'CONFIG_REQUEST';
|
||||
export const CONFIG_SUCCESS = 'CONFIG_SUCCESS';
|
||||
@ -87,7 +87,7 @@ export function applyDefaults(config) {
|
||||
}
|
||||
|
||||
if (!collection.has('sortableFields')) {
|
||||
const backend = currentBackend(config);
|
||||
const backend = resolveBackend(config);
|
||||
const defaultSortable = selectDefaultSortableFields(collection, backend);
|
||||
collection = collection.set('sortableFields', fromJS(defaultSortable));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user