Skip to content

Commit

Permalink
refactor: change order of method call
Browse files Browse the repository at this point in the history
  • Loading branch information
iberianpig committed Oct 13, 2023
1 parent 86448f3 commit dc50ce4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fusuma/plugin/inputs/remap_keyboard_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ def create_event(record:)

def setup_remapper
source_keyboards = KeyboardSelector.new(config_params(:keyboard_name_patterns)).select
internal_touchpad = TouchpadSelector.new(config_params(:touchpad_name_patterns)).select.first

if source_keyboards.empty?
MultiLogger.error("No keyboard found: #{config_params(:keyboard_name_patterns)}")
exit
end

internal_touchpad = TouchpadSelector.new(config_params(:touchpad_name_patterns)).select.first
if internal_touchpad.nil?
MultiLogger.error("No touchpad found: #{config_params(:touchpad_name_patterns)}")
exit
Expand Down

0 comments on commit dc50ce4

Please sign in to comment.