diff --git a/src/puter-js/src/modules/FileSystem/operations/stat.js b/src/puter-js/src/modules/FileSystem/operations/stat.js index 5e5ac686c..2d6af99c6 100644 --- a/src/puter-js/src/modules/FileSystem/operations/stat.js +++ b/src/puter-js/src/modules/FileSystem/operations/stat.js @@ -19,7 +19,7 @@ const stat = async function (...args) { // Otherwise, we assume separate arguments are provided options = { path: args[0], - options: typeof args[1] === 'object' ? args[1] : {}, + ...(typeof args[1] === 'object' ? args[1] : {}), success: typeof args[1] === 'object' ? args[2] : args[1], error: typeof args[1] === 'object' ? args[3] : args[2], // Add more if needed...