Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property '0' of undefined in bootstrap-select.js:846 #2203

Closed
esamo opened this issue Feb 27, 2019 · 2 comments

Comments

@esamo
Copy link

esamo commented Feb 27, 2019

Uncaught TypeError: Cannot read property '0' of undefined
    at scroll (bootstrap-select.js?248117410:846)
    at Selectpicker.createView (bootstrap-select.js?248117410:784)
    at Selectpicker.setSize (bootstrap-select.js?248117410:1732)
    at Selectpicker.refresh (bootstrap-select.js?248117410:2633)
    at HTMLSelectElement.<anonymous> (bootstrap-select.js?248117410:2722)
    at Function.each (jquery-3.3.1.min.js?248117410:2)
    at e.fn.init.each (jquery-3.3.1.min.js?248117410:2)
    at e.fn.init.Plugin [as selectpicker] (bootstrap-select.js?248117410:2702)
    at app_directives.js?248117410:393

scroll | @ | bootstrap-select.js?248117410:846
-- | -- | --
  | createView | @ | bootstrap-select.js?248117410:784
  | setSize | @ | bootstrap-select.js?248117410:1732
  | refresh | @ | bootstrap-select.js?248117410:2633
  | (anonymous) | @ | bootstrap-select.js?248117410:2722
  | each | @ | jquery-3.3.1.min.js?248117410:2
  | each | @ | jquery-3.3.1.min.js?248117410:2
  | Plugin | @ | bootstrap-select.js?248117410:2702
  | (anonymous) | @ | app_directives.js?248117410:393
  | setTimeout (async) |   |  
  | scope.refreshPlugin | @ | app_directives.js?248117410:390
  | (anonymous) | @ | app_directives.js?248117410:395
  | setTimeout (async) |   |  
  | scope.refreshPlugin | @ | app_directives.js?248117410:390
  | $digest | @ | angular.min.js?248117410:151
  | $apply | @ | angular.min.js?248117410:155
  | (anonymous) | @ | angular.min.js?248117410:22
  | invoke | @ | angular.min.js?248117410:45
  | c | @ | angular.min.js?248117410:22
  | Tc | @ | angular.min.js?248117410:22
  | xe | @ | angular.min.js?248117410:21
  | (anonymous) | @ | angular.min.js?248117410:346
  | l | @ | jquery-3.3.1.min.js?248117410:2
  | c | @ | jquery-3.3.1.min.js?248117410:2
  | setTimeout (async) |   |  
  | (anonymous) | @ | jquery-3.3.1.min.js?248117410:2
  | u | @ | jquery-3.3.1.min.js?248117410:2
  | fireWith | @ | jquery-3.3.1.min.js?248117410:2
  | fire | @ | jquery-3.3.1.min.js?248117410:2
  | u | @ | jquery-3.3.1.min.js?248117410:2
  | fireWith | @ | jquery-3.3.1.min.js?248117410:2
  | ready | @ | jquery-3.3.1.min.js?248117410:2
  | _ | @ | jquery-3.3.1.min.js?248117410:2

Line that.selectpicker.view.position0 = Math.max(0, chunks[firstChunk][0]) || 0;
Undefined chunks[firstChunk]

App code is just calling element.selectpicker('refresh') but I suspect a lot of DOM manipulations is done by angularjs directives and bootstrap-select can't handle the throttle.


Bootstrap-select v1.13.3
Chrome v72.0.3626.119

@esamo
Copy link
Author

esamo commented Feb 27, 2019

Also the map file for .min.js to .js is wrong - Chrome shows some comment line at the end like 2727, which makes no sense. I had to use bootstrap-select.js directly to see the proper line.

@caseyjhol
Copy link
Member

Appears to be a duplicate of #2198. Please open a separate issue with more information regarding the map file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants