From 6e1574671a1ea811389a0498abc2d23e89718d4e Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 5 Mar 2018 10:21:31 -0800 Subject: [PATCH] Use copy of config object to avoid making changes to the readonly objects --- extensions/emmet/src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index cab79c9be04..e9f21c463ae 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -309,7 +309,7 @@ export function sameNodes(node1: Node, node2: Node): boolean { export function getEmmetConfiguration(syntax: string) { const emmetConfig = vscode.workspace.getConfiguration('emmet'); const syntaxProfiles = Object.assign({}, emmetConfig['syntaxProfiles'] || {}); - + const preferences = Object.assign({}, emmetConfig['preferences'] || {}); // jsx, xml and xsl syntaxes need to have self closing tags unless otherwise configured by user if (syntax === 'jsx' || syntax === 'xml' || syntax === 'xsl') { syntaxProfiles[syntax] = syntaxProfiles[syntax] || {}; @@ -322,7 +322,7 @@ export function getEmmetConfiguration(syntax: string) { } return { - preferences: emmetConfig['preferences'], + preferences, showExpandedAbbreviation: emmetConfig['showExpandedAbbreviation'], showAbbreviationSuggestions: emmetConfig['showAbbreviationSuggestions'], syntaxProfiles,