fixed nullpointer
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
const { path } = Astro.params;
|
||||
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
||||
|
||||
const response = await fetch(`${API_URL}/uploads/${path}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user