Skip to content

Commit

Permalink
refactor(inputters): Ensure inputter options are always a table
Browse files Browse the repository at this point in the history
Annoyingly, options passed to an inputter constructor can be nil,
depending on how the inputter is invoked. Let's be more tolerant and
safe in that case, initializing to an empty table.
  • Loading branch information
Omikhleia authored and alerque committed Nov 20, 2023
1 parent 6fadf9a commit 7a833b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inputters/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputter._name = "base"
inputter._docclass = nil

function inputter:_init (options)
if options then self.options = options end
self.options = options or {}
end

function inputter:classInit (options)
Expand Down

0 comments on commit 7a833b0

Please sign in to comment.