File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -357,6 +357,11 @@ function apply(): void {
357357
358358 const text = cleanUpText ( ) ;
359359
360+ if ( text . length === 0 ) {
361+ Notifications . add ( "Text cannot be empty" , 0 ) ;
362+ return ;
363+ }
364+
360365 if ( state . customTextMode === "simple" ) {
361366 CustomText . setMode ( "repeat" ) ;
362367 state . customTextLimits . word = `${ text . length } ` ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const customTextLongLS = new LocalStorageWithSchema({
3131} ) ;
3232
3333export const CustomTextSettingsSchema = z . object ( {
34- text : z . array ( z . string ( ) ) ,
34+ text : z . array ( z . string ( ) ) . min ( 1 ) ,
3535 mode : CustomTextModeSchema ,
3636 limit : z . object ( { value : z . number ( ) , mode : CustomTextLimitModeSchema } ) ,
3737 pipeDelimiter : z . boolean ( ) ,
You can’t perform that action at this time.
0 commit comments