Subscribe on changes!

Component does not render in prod but does in debug, no errors or warnings

avatar
Feb 24th 2021

Version

3.0.6

Reproduction link

http://plnkr.co/edit/9KJo5ozJ86xh9I8u

Steps to reproduce

  1. Open repro
  2. Observe how the bug component does not get rendered (no errors or warnings) (it should output 6 "a"'s side by side)
  3. Comment the following in line 17 in bug.js, see how the component gets rendered:
if(this.values) { }
  1. Uncomment the related code again to break it again
  2. Switch to debug module: replace vue.esm-browser.prod.js with vue.esm-browser.js in index.html
  3. Component gets rendered again despite the related "if" still being there

What is expected?

Component should render if using prod module; behavior should not be inconsistent with prod or debug module

What is actually happening?

Component does not render in prod mode, no errors or warnings in prod or debug mode

avatar
Feb 25th 2021

just tip here. accessCache['values'] should not equal AccessTypes.OTHER

image

if if(this.values) { } exec before return { values: vals, autoFocusIndex }; the accessCache['values'] will be set to AccessTypes.OTHER in PublicInstanceProxyHandlers.get. so values is incorrect when next time access values

should we just remove

} else if (!__FEATURE_OPTIONS_API__ || !isInBeforeCreate) {
   accessCache![key] = AccessTypes.OTHER
}

or retry to get value when accessCache[key] === AccessTypes.OTHER