yiisoft / jquery-pjax

pushState + ajax = pjax
http://pjax.herokuapp.com
MIT License
144 stars 40 forks source link

Cannot read property 'push' of undefined #45

Closed bilaljafar closed 7 years ago

bilaljafar commented 7 years ago

My Code class AppAsset extends AssetBundle { public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'css/site.css', ]; public $js = [ 'js/site.js', 'js/jquery-pjax.js', ]; public $depends = [ 'yii\web\YiiAsset', 'yii\bootstrap\BootstrapAsset', 'yii\widgets\PjaxAsset', ]; }

When no Pjax widget is used, then it throws an error "Cannot read property 'push' of undefined"

cebe commented 7 years ago

'js/jquery-pjax.js',

why register the pjax js without the pjax widget? It also looks like you are registering it twice...