Skip to content

ajaxPrefilter error  #30

@nansCabanac

Description

@nansCabanac

Hey,

I want include default data in ajax request, but when i try this code :

` $.ajaxPrefilter(function (options, originalOptions) {

    options.data = $.extend(originalOptions.data, { r: "revision" });

}); `

I have found this code at :
https://stackoverflow.com/questions/6996993/jquerys-ajaxsetup-i-would-like-to-add-default-data-for-get-requests-only

It's not work, and i have this error :
Uncaught TypeError: o.data.replace is not a function
at ajax (jquery-3.2.1.min.js:4)
at ajaxq.js:30
at enqueue (ajaxq.js:53)
at Function.$.ajaxq (ajaxq.js:28)

How use ajax filter with ajaxq ?

Tanks for help !
Have nice day !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions