Skip to content

Commit 1c6e156

Browse files
committed
Cleanup names
1 parent 20e6754 commit 1c6e156

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/shared/migrateOptions.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,30 @@ export async function MigrateOptions(vscode: vscode): Promise<void> {
9797
continue;
9898
}
9999

100-
const inspectionValueOfnewName = configuration.inspect(newName);
101-
if (inspectionValueOfnewName == undefined) {
100+
const inspectionValueOfNewOption = configuration.inspect(newName);
101+
if (inspectionValueOfNewOption == undefined) {
102102
continue;
103103
}
104104

105-
const newNameValue = configuration.get(newName);
106-
if (newNameValue == undefined) {
105+
const newOptionValue = configuration.get(newName);
106+
if (newOptionValue == undefined) {
107107
continue;
108108
}
109109

110-
if (shouldMove(newNameValue, inspectionValueOfnewName.defaultValue)) {
110+
if (shouldMove(newOptionValue, inspectionValueOfNewOption.defaultValue)) {
111111
await MoveOptionsValue(oldName, newName, configuration);
112112
}
113113
}
114114
}
115115

116-
function shouldMove(newNameValue: unknown, defaultInspectValueOfnewName: unknown): boolean {
117-
if (newNameValue == defaultInspectValueOfnewName) {
116+
function shouldMove(newOptionValue: unknown, defaultInspectValueOfNewOption: unknown): boolean {
117+
if (newOptionValue == defaultInspectValueOfNewOption) {
118118
return true;
119119
}
120120

121121
// For certain kinds of complex object options, vscode will return a proxy object which isn't comparable to the default empty object {}.
122-
if (types.isProxy(newNameValue)) {
123-
return JSON.stringify(newNameValue) === JSON.stringify(defaultInspectValueOfnewName);
122+
if (types.isProxy(newOptionValue)) {
123+
return JSON.stringify(newOptionValue) === JSON.stringify(defaultInspectValueOfNewOption);
124124
}
125125

126126
return false;

0 commit comments

Comments
 (0)