Browse Source

fixed order

Mirko Pagliai 9 years ago
parent
commit
625346da9e
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/Network/Request.php

+ 7 - 7
src/Network/Request.php

@@ -647,16 +647,16 @@ class Request implements ArrayAccess
         if (!isset(static::$_detectors[$type])) {
             return false;
         }
-        
-        if (empty($args)) {
-            if (!isset($this->_detectorCache[$type])) {
-                $this->_detectorCache[$type] = $this->_is($type, $args);
-            }
 
-            return $this->_detectorCache[$type];
+        if ($args) {
+            return $this->_is($type, $args);
+        }
+        
+        if (!isset($this->_detectorCache[$type])) {
+            $this->_detectorCache[$type] = $this->_is($type, $args);
         }
 
-        return $this->_is($type, $args);
+        return $this->_detectorCache[$type];
     }
 
     /**