Skip to content

Commit 80e31e7

Browse files
authored
Merge pull request #65 from CodinGame/make-function-async
Function should be async
2 parents c32c967 + 9cca974 commit 80e31e7

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/service-override/keybindings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ function setCommands (keybindings: IUserFriendlyCommand | IUserFriendlyCommand[]
119119
}])
120120
}
121121

122-
function updateUserKeybindings (keybindingsJson: string): void {
122+
async function updateUserKeybindings (keybindingsJson: string): Promise<void> {
123123
const userDataProfilesService: IUserDataProfilesService = StandaloneServices.get(IUserDataProfilesService)
124-
void StandaloneServices.get(IFileService).writeFile(userDataProfilesService.defaultProfile.keybindingsResource, VSBuffer.fromString(keybindingsJson))
124+
await StandaloneServices.get(IFileService).writeFile(userDataProfilesService.defaultProfile.keybindingsResource, VSBuffer.fromString(keybindingsJson))
125125
}
126126

127127
export default function getServiceOverride (): IEditorOverrideServices {

src/webpack-loader.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { RawLoaderDefinitionFunction } from 'webpack'
22

33
const monacoPolyfillLoader: RawLoaderDefinitionFunction = function (source) {
44
if (this.resourcePath.endsWith('monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js')) {
5-
return `${source}
5+
return `${source.toString()}
66
export function setSnippetSuggestSupport(support) {
77
const old = _snippetSuggestSupport;
88
_snippetSuggestSupport = support;
@@ -14,3 +14,4 @@ export function setSnippetSuggestSupport(support) {
1414
}
1515

1616
export default monacoPolyfillLoader
17+
export const raw = true // for TTFs, see https://stackoverflow.com/questions/48824081/webpack-image-loader-encoding-breaks

0 commit comments

Comments
 (0)