mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Merge pull request #2429 from yiiframework-com-ua/master
Fix for multiple $.ajax calls with "JSONP" dataType
This commit is contained in:
@ -236,6 +236,9 @@ yii = (function ($) {
|
||||
return this.src.charAt(0) === '/' ? hostInfo + this.src : this.src;
|
||||
}).toArray();
|
||||
$.ajaxPrefilter('script', function (options, originalOptions, xhr) {
|
||||
if(options.dataType == 'jsonp') {
|
||||
return;
|
||||
}
|
||||
var url = options.url.charAt(0) === '/' ? hostInfo + options.url : options.url;
|
||||
if ($.inArray(url, loadedScripts) === -1) {
|
||||
loadedScripts.push(url);
|
||||
|
Reference in New Issue
Block a user