Topic: MDBAlert BUG when static attribute used.
                  
                  Hansu Lee
                  premium
                  asked 4 years ago
                
Expected behavior No error
Actual behavior Uncaught (in promise) TypeError: Cannot read properties of null (reading 'disconnect')
Resources (screenshots, code snippets etc.)
MDBAlert.vue : bug
 onMounted() {
        ...
      if (props.stacking && !props.static) {
        setupStacking();
      } 
        ...
    }
    const setupStacking = () => {
        ...
        observerStacking();
    };
 onUnmounted(() => {
  _clearTimeout();
  observer.value.disconnect();       // <--- BUG:  observer is not initialized (null)
                    // when 'static' attribute is set.
});
                
                  FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
              Opened
Specification of the issue
              - ForumUser: Premium
 - Premium support: Yes
 - Technology: MDB Vue
 - MDB Version: MDB5 1.4.0
 - Device: General
 - Browser: Chrome 94. (arm64)
 - OS: MAC OS 11.6
 - Provided sample code: No
 - Provided link: No
 
Mikołaj Smoleński staff commented 4 years ago
Thanks for posting an issue. We'll check it and make fix if needed.
Keep coding, Mikołaj from MDB