File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/app/src/app/overmind/namespaces/workspace Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,16 @@ export const tagAdded: AsyncAction = withOwnedSandbox(
2222 const { tagName } = state . workspace . tags ;
2323 const sandbox = state . editor . currentSandbox ;
2424
25- sandbox . tags . push ( tagName ) ;
25+ const cleanTag = tagName . replace ( / # / g, '' ) ;
26+
27+ sandbox . tags . push ( cleanTag ) ;
2628
2729 try {
28- sandbox . tags = await effects . api . createTag ( sandbox . id , tagName ) ;
30+ sandbox . tags = await effects . api . createTag ( sandbox . id , cleanTag ) ;
2931
3032 await actions . editor . internal . updateSandboxPackageJson ( ) ;
3133 } catch ( error ) {
32- const index = sandbox . tags . indexOf ( tagName ) ;
34+ const index = sandbox . tags . indexOf ( cleanTag ) ;
3335 sandbox . tags . splice ( index , 1 ) ;
3436 actions . internal . handleError ( { message : 'Unable to add tag' , error } ) ;
3537 }
You can’t perform that action at this time.
0 commit comments