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

Cannot read properties of undefined (reading 'dispose') #7059

Open
muji-wyh opened this issue Jan 9, 2025 · 0 comments
Open

Cannot read properties of undefined (reading 'dispose') #7059

muji-wyh opened this issue Jan 9, 2025 · 0 comments
Labels
status:triage New Issue - needs triage

Comments

@muji-wyh
Copy link

muji-wyh commented Jan 9, 2025

🐛 Bug Report

💻 Repro or Code Sample

at Edge's new tab page, we got lots of Cannot read properties of undefined (reading 'dispose') error messages in our log

{
	"stack": "TypeError: Cannot read properties of undefined (reading 'dispose')\n    
    at v.refreshAllViews 
    at v.handleChange 
    a......",
}

🤔 Expected Behavior

don't throw this exception

😯 Current Behavior

💁 Possible Solution

why not use "?.dispose" here?

fast-element/templating/repeat.js

    refreshAllViews(templateChanged = false) {
        //
        if (viewsLength === 0) {
           //
        }
        else {
            //
            for (i = 0, itemsLength = removed.length; i < itemsLength; ++i) {
                removed[i].dispose();
                // ^^^^^^^^^^^
            }
        }
    }

Image

🔦 Context

🌍 Your Environment

Edge Browser, new tab page

@muji-wyh muji-wyh added the status:triage New Issue - needs triage label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:triage New Issue - needs triage
Projects
None yet
Development

No branches or pull requests

1 participant