Skip to content

Commit b14c042

Browse files
SaraVieiraCompuIves
authored andcommitted
Fix now deployment (codesandbox#1662)
There was an issue where the package.json was being sent twice I now check if it is in the array of files before adding it
1 parent 06860a8 commit b14c042

File tree

1 file changed

+6
-1
lines changed
  • packages/app/src/app/store/modules/deployment

1 file changed

+6
-1
lines changed

packages/app/src/app/store/modules/deployment/actions.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@ export async function createApiData({ props, state }) {
193193

194194
apiData.files.push({ file: filePath, data, encoding: 'base64' });
195195
}
196-
if (filePath === 'package.json') {
196+
197+
// if person added some files but no package.json
198+
if (
199+
filePath === 'package.json' &&
200+
!apiData.files.filter(f => f.name === 'package.json')
201+
) {
197202
apiData.files.push({
198203
file: 'package.json',
199204
data: JSON.stringify(packageJSON, null, 2),

0 commit comments

Comments
 (0)