mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Fix lodash-es typos (#2724)
* Fix LocalForage not saving items * Fix bulk update typos
This commit is contained in:
@@ -144,13 +144,13 @@ export const EditScenesDialog: React.FC<IListOperationProps> = (
|
|||||||
if (sceneStudioID !== updateStudioID) {
|
if (sceneStudioID !== updateStudioID) {
|
||||||
updateStudioID = undefined;
|
updateStudioID = undefined;
|
||||||
}
|
}
|
||||||
if (isEqual(scenePerformerIDs, updatePerformerIds)) {
|
if (!isEqual(scenePerformerIDs, updatePerformerIds)) {
|
||||||
updatePerformerIds = [];
|
updatePerformerIds = [];
|
||||||
}
|
}
|
||||||
if (isEqual(sceneTagIDs, updateTagIds)) {
|
if (!isEqual(sceneTagIDs, updateTagIds)) {
|
||||||
updateTagIds = [];
|
updateTagIds = [];
|
||||||
}
|
}
|
||||||
if (isEqual(sceneMovieIDs, updateMovieIds)) {
|
if (!isEqual(sceneMovieIDs, updateMovieIds)) {
|
||||||
updateMovieIds = [];
|
updateMovieIds = [];
|
||||||
}
|
}
|
||||||
if (scene.organized !== updateOrganized) {
|
if (scene.organized !== updateOrganized) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export function useLocalForage<T>(
|
|||||||
}, [loading, key, defaultValue]);
|
}, [loading, key, defaultValue]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isEqual(Cache[key], data)) {
|
if (!isEqual(Cache[key], data)) {
|
||||||
Cache[key] = {
|
Cache[key] = {
|
||||||
...Cache[key],
|
...Cache[key],
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export function getAggregatePerformerIds(state: IHasPerformers[]) {
|
|||||||
} else {
|
} else {
|
||||||
const perfIds = o.performers ? o.performers.map((p) => p.id).sort() : [];
|
const perfIds = o.performers ? o.performers.map((p) => p.id).sort() : [];
|
||||||
|
|
||||||
if (isEqual(ret, perfIds)) {
|
if (!isEqual(ret, perfIds)) {
|
||||||
ret = [];
|
ret = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ export function getAggregateTagIds(state: IHasTags[]) {
|
|||||||
} else {
|
} else {
|
||||||
const tIds = o.tags ? o.tags.map((t) => t.id).sort() : [];
|
const tIds = o.tags ? o.tags.map((t) => t.id).sort() : [];
|
||||||
|
|
||||||
if (isEqual(ret, tIds)) {
|
if (!isEqual(ret, tIds)) {
|
||||||
ret = [];
|
ret = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ export function getAggregateMovieIds(state: IHasMovies[]) {
|
|||||||
} else {
|
} else {
|
||||||
const mIds = o.movies ? o.movies.map((m) => m.movie.id).sort() : [];
|
const mIds = o.movies ? o.movies.map((m) => m.movie.id).sort() : [];
|
||||||
|
|
||||||
if (isEqual(ret, mIds)) {
|
if (!isEqual(ret, mIds)) {
|
||||||
ret = [];
|
ret = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ export function getAggregateState<T>(
|
|||||||
newValue: T,
|
newValue: T,
|
||||||
first: boolean
|
first: boolean
|
||||||
) {
|
) {
|
||||||
if (!first && isEqual(currentValue, newValue)) {
|
if (!first && !isEqual(currentValue, newValue)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user