You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data variable on line 25 is never changed and on line 33 it is always used to bring context.data to the origin state except the field of the current loop. Therefore, just the field of the last loop is removed from the context.data.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
"@feathersjs/feathers": "^4.5.15",
"feathers-hooks-common": "^6.1.3",
"lodash": "^4.17.21",
"typescript": "^4.7.4",
NodeJS version:
Node 16
The text was updated successfully, but these errors were encountered:
In case of using the preventChanges hook without wanting to throw an error, then it will only remove the last defined field from the context.data.
Example
context.data => {id: '1234', email: 'test@test.com', username: 'testuser'}
preventChanges(false, 'id', 'email')
Actual result:
context.data => {id: '1234', username: 'testuser'}
Expected result:
context.data => {username: 'testuser'}
Root issue
The data variable on line 25 is never changed and on line 33 it is always used to bring context.data to the origin state except the field of the current loop. Therefore, just the field of the last loop is removed from the context.data.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
"@feathersjs/feathers": "^4.5.15",
"feathers-hooks-common": "^6.1.3",
"lodash": "^4.17.21",
"typescript": "^4.7.4",
NodeJS version:
Node 16
The text was updated successfully, but these errors were encountered: