diff --git a/src/HanyuuContext.php b/src/HanyuuContext.php index 07a71b7..ebfa5fc 100644 --- a/src/HanyuuContext.php +++ b/src/HanyuuContext.php @@ -37,7 +37,8 @@ class HanyuuContext { } public function getWebAssetInfo(): ?object { - return json_decode(file_get_contents(HAU_DIR_ASSETS . '/current.json')); + $path = HAU_DIR_ASSETS . '/current.json'; + return is_file($path) ? json_decode(file_get_contents($path)) : null; } public function getTemplating(): SasaeEnvironment {