File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,8 @@ export class PromptAPI {
257257 * ```
258258 */
259259 public text ( options : InputPromptOptions ) : Promise < string | undefined > {
260+ options . initialValue = options . initialValue ?? '' ;
261+
260262 return new Promise < string | undefined > ( ( resolve , reject ) => {
261263 try {
262264 new SvelteModal < AnySvelteComponent , unknown > (
@@ -297,6 +299,8 @@ export class PromptAPI {
297299 * ```
298300 */
299301 public textarea ( options : InputPromptOptions ) : Promise < string | undefined > {
302+ options . initialValue = options . initialValue ?? '' ;
303+
300304 return new Promise < string | undefined > ( ( resolve , reject ) => {
301305 try {
302306 new SvelteModal < AnySvelteComponent , unknown > (
@@ -336,6 +340,8 @@ export class PromptAPI {
336340 * ```
337341 */
338342 public number ( options : NumberInputPromptOptions ) : Promise < number | undefined > {
343+ options . initialValue = options . initialValue ?? 0 ;
344+
339345 return new Promise < number | undefined > ( ( resolve , reject ) => {
340346 try {
341347 new SvelteModal < AnySvelteComponent , unknown > (
You can’t perform that action at this time.
0 commit comments