Closed arogachev closed 7 years ago
Related issue in Yii2 - https://github.com/yiisoft/yii2/issues/13300. Should be synchronized here.
This check:
// Ignore links with data-pjax="0" if ($(link).data('pjax') == 0) { return; }
needs to be modified accordingly too, because "" == 0 will evaluate to true.
"" == 0
true
Can be:
$(link).data('pjax') === 0)
(data returns 0 as number).
data
0
number
Or in case of a string which is returend by attr for example:
string
attr
$(link).attr('data-pjax') === '0'
Or maybe even better:
parseInt($(link).data('pjax')) === 0
Related issue in Yii2 - https://github.com/yiisoft/yii2/issues/13300. Should be synchronized here.
This check:
needs to be modified accordingly too, because
"" == 0
will evaluate totrue
.Can be:
(
data
returns0
asnumber
).Or in case of a
string
which is returend byattr
for example:Or maybe even better: