OSDN Git Service

選択順を変更
[kcd/KCD.git] / KCD / CommandRegister.swift
index 3be8ee0..1214495 100644 (file)
@@ -66,20 +66,16 @@ final class CommandRegister {
             if !response.success {
                 
                 return FailedCommand(apiResponse: response)
-                
-            }
-            
-            if let c = registeredClasses.lazy.filter({ $0.canExecuteAPI(response.api) }).first {
-                
-                return c.init(apiResponse: response)
-                
             }
             
-            
             if IgnoreCommand.canExecuteAPI(response.api) {
                 
                 return IgnoreCommand(apiResponse: response)
+            }
+            
+            if let c = registeredClasses.lazy.filter({ $0.canExecuteAPI(response.api) }).first {
                 
+                return c.init(apiResponse: response)
             }
             
             return UnknownComand(apiResponse: response)