Skip to content

Commit

Permalink
Observable.fromFileByLine: formatting;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed Sep 12, 2018
1 parent 4962bdb commit 457fe4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/observable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ end
-- @returns {Observable}
function Observable.fromFileByLine(filename)
return Observable.create(function(observer)
local f = io.open(filename, 'r')
if f
then
f:close()
local file = io.open(filename, 'r')
if file then
file:close()

for line in io.lines(filename) do
observer:onNext(line)
end
Expand Down

0 comments on commit 457fe4c

Please sign in to comment.