Skip to content

Commit 3d02b0a

Browse files
jyash97SaraVieira
authored andcommitted
fix: avoid empty spaces on title & description (codesandbox#3396)
* fix: avoid empty spaces on title & description * refactor: remove redundant condition check for empty string
1 parent 787dff2 commit 3d02b0a

File tree

1 file changed

+3
-3
lines changed
  • packages/app/src/app/overmind/namespaces/workspace

1 file changed

+3
-3
lines changed

packages/app/src/app/overmind/namespaces/workspace/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ export const sandboxInfoUpdated: AsyncAction = withOwnedSandbox(
9292
async ({ state, effects, actions }) => {
9393
const sandbox = state.editor.currentSandbox;
9494
const { project } = state.workspace;
95-
96-
const hasChangedTitle = project.title && sandbox.title !== project.title;
95+
const hasChangedTitle =
96+
project.title.trim() && sandbox.title !== project.title;
9797
const hasChangedDescription =
98-
project.description && sandbox.description !== project.description;
98+
project.description.trim() && sandbox.description !== project.description;
9999
const hasChangedAlias = project.alias && sandbox.alias !== project.alias;
100100
const hasChanged =
101101
hasChangedTitle || hasChangedDescription || hasChangedAlias;

0 commit comments

Comments
 (0)