mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
revert strict
This commit is contained in:
parent
e027d73fe3
commit
71a4e6ed29
@ -9,16 +9,15 @@ const strategies = {
|
||||
|
||||
// Diffs allowed on specific attributes properties
|
||||
strict(diffs: Diff[]) {
|
||||
const isIgnorableDiff = (diff: Diff) => {
|
||||
const isIgnorableDiff = ({ path }: Diff) => {
|
||||
return (
|
||||
// Ignore cases where...
|
||||
diff.path.length === 3 &&
|
||||
path.length === 3 &&
|
||||
// Root property must be attributes
|
||||
diff.path[0] === 'attributes' &&
|
||||
path[0] === 'attributes' &&
|
||||
// Need a valid string attribute name
|
||||
typeof diff.path[1] === 'string' &&
|
||||
typeof path[1] === 'string' &&
|
||||
// The diff must be on ignorable attribute properties
|
||||
['private', 'required', 'configurable'].includes(diff.path[2])
|
||||
['private', 'required', 'configurable'].includes(path[2])
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user