Skip to content

Commit

Permalink
fixup! fix: an error when passing the editor's devfile link
Browse files Browse the repository at this point in the history
  • Loading branch information
olexii4 committed Mar 7, 2023
1 parent f41f79f commit 23d5623
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { AUTHORIZED, SanityCheckAction } from '../../sanityCheckMiddleware';
import * as DwServerConfigStore from '../../ServerConfig';
import { selectOpenVSXUrl } from '../../ServerConfig/selectors';
import { fetchResources } from '../../../services/dashboard-backend-client/devworkspaceResourcesApi';
import { dump, load } from 'js-yaml';
import { dump } from 'js-yaml';
import { loadResourcesContent } from '../../../services/registry/resources';
import { checkRunningWorkspacesLimit } from './checkRunningWorkspacesLimit';
import { selectDevWorkspacesResourceVersion } from './selectors';
Expand Down Expand Up @@ -551,6 +551,7 @@ export const actionCreators: ActionCreators = {
});
if (response.data) {
editorContent = response.data;
editorEntry = undefined;
} else {
throw new Error('Failed to find an Editor in the fetched resources.');
}
Expand All @@ -559,7 +560,7 @@ export const actionCreators: ActionCreators = {
editorContent = undefined;
}
if (editorEntry !== defaultEditorEntry) {
console.log(
console.debug(
`User specified a different editor than the current default. Loading ${editorEntry} definition instead of ${defaultEditorEntry}.`,
);
}
Expand All @@ -569,6 +570,8 @@ export const actionCreators: ActionCreators = {
if (!editorContent) {
editorEntry = defaultEditorEntry;
console.debug(`Using default editor ${defaultEditorEntry}`);
} else {
editorEntry = undefined;
}
}

Expand Down

0 comments on commit 23d5623

Please sign in to comment.