uranusjr opened a new issue, #41332:
URL: https://github.com/apache/airflow/issues/41332
### Apache Airflow version
main (development)
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
When an empty DAG is created without any tasks, the DAG can be parsed and
triggered in the UI, but the UI crashes when you click on _Graph_. The entire
screen (except the top bar) disappears.
```
Uncaught TypeError: u.nodes.children[0] is undefined
gQ http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
wa http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
Ms http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
wl http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
vu http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
mu http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
gu http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
iu http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
ru http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
_ http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
O http://localhost:28080/static/dist/grid.abc695e791ed71742eea.js:2
grid.abc695e791ed71742eea.js:2:2750893
```
### What you think should happen instead?
The UI should load correctly. The graph should be empty (no blocks), but
other controls should still load.
### How to reproduce
1. Load this DAG into Airflow
```python
from airflow.decorators import dag
@dag(schedule=None)
def empty():
pass
empty()
2. Trigger a run from the Home page.
3. Click into the DAG detail view
4. Clikc on _Graph_
### Operating System
n/a
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]