OSDN Git Service

選択順を変更
authormasakih <masakih@users.sourceforge.jp>
Fri, 8 Dec 2017 12:21:19 +0000 (21:21 +0900)
committermasakih <masakih@users.sourceforge.jp>
Fri, 8 Dec 2017 12:21:29 +0000 (21:21 +0900)
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)