Fix panic in open urls (#9032)
Co-Authored-By: Nathan <nathan@zed.dev> Release Notes: - N/A Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
@@ -249,7 +249,7 @@ pub fn init(cx: &mut AppContext) {
|
||||
cx.on_action(move |_: &workspace::NewFile, cx| {
|
||||
let app_state = workspace::AppState::global(cx);
|
||||
if let Some(app_state) = app_state.upgrade() {
|
||||
workspace::open_new(&app_state, cx, |workspace, cx| {
|
||||
workspace::open_new(app_state, cx, |workspace, cx| {
|
||||
Editor::new_file(workspace, &Default::default(), cx)
|
||||
})
|
||||
.detach();
|
||||
@@ -258,7 +258,7 @@ pub fn init(cx: &mut AppContext) {
|
||||
cx.on_action(move |_: &workspace::NewWindow, cx| {
|
||||
let app_state = workspace::AppState::global(cx);
|
||||
if let Some(app_state) = app_state.upgrade() {
|
||||
workspace::open_new(&app_state, cx, |workspace, cx| {
|
||||
workspace::open_new(app_state, cx, |workspace, cx| {
|
||||
Editor::new_file(workspace, &Default::default(), cx)
|
||||
})
|
||||
.detach();
|
||||
|
||||
Reference in New Issue
Block a user