This commit is contained in:
2021-04-25 15:38:41 +08:00
parent db3f4d7338
commit ed199261be
+2 -3
View File
@@ -54,13 +54,12 @@ class Service extends Component
if (is_object($config)) { if (is_object($config)) {
return $this->_components[$id] = $config; return $this->_components[$id] = $config;
} }
$object = Snowflake::createObject($config); $object = clone Snowflake::createObject($config);
} else { } else {
$config = $this->_alias[$id]; $config = $this->_alias[$id];
$object = Snowflake::createObject($config); $object = clone Snowflake::createObject($config);
} }
Snowflake::configure($object, $config);
return $this->_components[$id] = $object; return $this->_components[$id] = $object;
} }