Skip to content

Deprecation of modification by reference

Compare
Choose a tag to compare
@Johnbastian Johnbastian released this 12 Sep 11:12

Main change (potentially breaking)

before and beforeRequest will now require their respective objects (params and request) to be returned if any modifications are to be passed on, instead of allowing modification by reference without having to return them.
This will throw an error in development mode, otherwise a console warning will be logged instead.

Other changes

  • url in global configuration will now invoke the same deprecation behaviour (error in development mode, console warn otherwise), in favour of baseUrl.
  • afterHeaders will check if the returned value is an object, (error in development mode, console warn otherwise).