mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-05-23 14:16:55 +00:00
fix unlock() to unpin bgs from full set (#13416)
This commit is contained in:
parent
bb8df83fb6
commit
45fa2a3221
1 changed files with 9 additions and 0 deletions
|
|
@ -275,6 +275,15 @@ export default function unlock (user, req = {}, analytics) {
|
|||
|
||||
if (isFullSet) {
|
||||
paths.forEach(pathPart => purchaseItem(pathPart, setType, user));
|
||||
|
||||
if (isBackground) {
|
||||
paths.forEach(pathPart => {
|
||||
const [key, value] = splitPathItem(pathPart);
|
||||
const backgroundContent = content.backgroundsFlat[value];
|
||||
const itemInfo = getItemInfo(user, key, backgroundContent);
|
||||
removeItemByPath(user, itemInfo.path);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
const [key, value] = splitPathItem(path);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue