Update prevent-changes.js
Update prevent-changes.js

Hi, I think it's better to set `fieldNames` outside the hook function. The current version makes `fieldNames[0]` to always be a string after `fieldNames = fieldNames.slice(1);`. So even if the developer uses the `preventChanges(true, ...fieldNames)` syntax, the hook will log the deprecated warning.
With this solution, the warning will be logged only if the developer is using the deprecated syntax.
feathersjs/feathers-hooks-common