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

fix(ui-build): Fix for Cannot read properties of null (reading 'focus') #2649

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MuDzYNN
Copy link

@MuDzYNN MuDzYNN commented Jul 18, 2024

Goal of this PR

When NUI is initializing in nui console you always see:

Uncaught TypeError: Cannot read properties of null (reading 'focus')
    at root.html:108:26
(anonymous) @ root.html:108
setTimeout (async)
frameEscapeFunctions.<computed> @ root.html:106

This error is regarding to line: frame.contentWindow.focus(); and i'm just added question marks to avoid displaying this error.

How is this PR achieving the goal

As above I'm just added question marks, so when frame or frame.contentWindow is null nothing happen.

This PR applies to the following area(s)

ui-build

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Jul 18, 2024
@MuDzYNN MuDzYNN changed the title Nui root, fix for: Cannot read properties of null (reading 'focus') fix(ui-build): Fix for Cannot read properties of null (reading 'focus') Jul 18, 2024
@FabianTerhorst
Copy link
Contributor

It might be good to know why its null. Maybe its a symptom of another bug.

@prikolium-cfx prikolium-cfx added ready-to-merge This PR is enqueued for merging and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants