Skip to content

Commit 1acc622

Browse files
committed
Protect TTS::MockAdapter from unconfigured path
1 parent 4939dd2 commit 1acc622

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/active_intelligence/tts/mock_adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module TTS
55
class MockAdapter < Adapter
66

77
def generate(_text, _options = {})
8+
return nil if settings[:path].nil?
9+
810
return File.open(settings[:path]).read
911
end
1012
end

0 commit comments

Comments
 (0)