Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit a8f4193

Browse files
committed
fix: callback check missing
1 parent 7df5930 commit a8f4193

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Conversation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ public function ask(Prompt $message, $callback = null)
128128
$this->current_text = substr($this->current_text, 0, $pos);
129129
}
130130

131-
$callback($this->current_text, $tokens);
131+
if (! is_null($callback)) {
132+
$callback($this->current_text, $tokens);
133+
}
132134
});
133135

134136
@$es->connect();

0 commit comments

Comments
 (0)