Skip to content

Commit b988288

Browse files
committed
Forgive more issues with ch_info?
1 parent 5589195 commit b988288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/mocks/autoload_proompter.vader

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Execute (proompter#SendPromptToChat -- Uses default channel callback when stream
102102

103103
sleep 100m
104104
finally
105-
if get(ch_info(state.channel), 'status', v:null) != 'closed'
105+
if type(state.channel) != v:t_none && get(ch_info(state.channel), 'status', v:null) != 'closed'
106106
call ch_close(state.channel)
107107
endif
108108
endtry
@@ -186,7 +186,7 @@ Execute (proompter#SendPromptToChat -- Uses default channel callback when non-st
186186

187187
sleep 100m
188188
finally
189-
if get(ch_info(state.channel), 'status', v:null) != 'closed'
189+
if type(state.channel) != v:t_none && get(ch_info(state.channel), 'status', v:null) != 'closed'
190190
call ch_close(state.channel)
191191
endif
192192
endtry
@@ -295,7 +295,7 @@ Execute (proompter#SendPromptToChat -- Appends to buffer via example channel cal
295295

296296
sleep 100m
297297
finally
298-
if get(ch_info(state.channel), 'status', v:null) != 'closed'
298+
if type(state.channel) != v:t_none && get(ch_info(state.channel), 'status', v:null) != 'closed'
299299
call ch_close(state.channel)
300300
endif
301301
endtry

0 commit comments

Comments
 (0)