File tree 1 file changed +6
-0
lines changed 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,8 @@ export class PromptAPI {
257
257
* ```
258
258
*/
259
259
public text ( options : InputPromptOptions ) : Promise < string | undefined > {
260
+ options . initialValue = options . initialValue ?? '' ;
261
+
260
262
return new Promise < string | undefined > ( ( resolve , reject ) => {
261
263
try {
262
264
new SvelteModal < AnySvelteComponent , unknown > (
@@ -297,6 +299,8 @@ export class PromptAPI {
297
299
* ```
298
300
*/
299
301
public textarea ( options : InputPromptOptions ) : Promise < string | undefined > {
302
+ options . initialValue = options . initialValue ?? '' ;
303
+
300
304
return new Promise < string | undefined > ( ( resolve , reject ) => {
301
305
try {
302
306
new SvelteModal < AnySvelteComponent , unknown > (
@@ -336,6 +340,8 @@ export class PromptAPI {
336
340
* ```
337
341
*/
338
342
public number ( options : NumberInputPromptOptions ) : Promise < number | undefined > {
343
+ options . initialValue = options . initialValue ?? 0 ;
344
+
339
345
return new Promise < number | undefined > ( ( resolve , reject ) => {
340
346
try {
341
347
new SvelteModal < AnySvelteComponent , unknown > (
You can’t perform that action at this time.
0 commit comments