framework icon indicating copy to clipboard operation
framework copied to clipboard

history error

Open janat08 opened this issue 7 years ago • 3 comments

tries to access state.history.params, and while it's defined before and after the access, it will fail if there's another router being used.

typeNX.js:2385 Uncaught TypeError: Cannot read property 'params' of null
    at syncStatesWithParams (typeNX.js:2385)
    at eval (typeNX.js:2352)
    at SmartWizard._setURLHash (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:544)
    at SmartWizard._transitPage (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:460)
    at SmartWizard._loadStepContent (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:404)
    at SmartWizard._showStep (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:354)
    at SmartWizard.init (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:121)
    at new SmartWizard (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:88)
    at HTMLDivElement.eval (/node_modules/smartwizard/dist/js/jquery.smartWizard.js:638)
    at Function.each (modules.js?hash=fa65c5222d37ccb63afe46b49c068a2095600027:6549)

janat08 avatar May 04 '18 12:05 janat08

large reproduction, visit /addcoin route, and the code is in typeahead.js and located on 3 step for /addcoin form for exchanges field. https://github.com/Blockrazor/blockrazor/commit/649b71179cfa0b55f462ff80381037fb60a3d055 . The link doesn't point at actual commit where the bug begun.

janat08 avatar May 04 '18 12:05 janat08

I'm not using route/router middlewears or ref.

janat08 avatar May 04 '18 15:05 janat08

It even causes navigation bugs if another router begins overwriting history.

janat08 avatar May 04 '18 15:05 janat08