Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit e7fbb96

Browse files
authored
Merge pull request #477 from mccxiv/fix-shortcuts
Fix shortcuts, fixes #473
2 parents 209d226 + fb94e25 commit e7fbb96

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tc-renderer/store/modules/settings/validate-settings.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const fromBlueprint = (blueprint, untrustedObj) => {
2020
const blueprintType = R.type(value)
2121
return R.equals(untrustedType, blueprintType) ? untrustedValue : value
2222
}),
23-
unflattenObj
23+
unflattenObj,
24+
addShortcutsFrom(untrustedObj)
2425
)(blueprint)
2526
}
2627

@@ -50,6 +51,11 @@ const flattenObjToDotPath = obj => {
5051
return R.fromPairs(go(obj))
5152
}
5253

54+
const addShortcutsFrom = untrustedObj => trustedObject => {
55+
trustedObject.shortcuts = untrustedObj.shortcuts || {}
56+
return trustedObject
57+
}
58+
5359
export const getValidatedSettings = (settings = {}) => {
5460
return fromBlueprint(defaults, settings)
5561
}

0 commit comments

Comments
 (0)