File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -152,26 +152,26 @@ export class Deployment {
152152
153153 disposables . push ( inputBox . onDidHide ( ( ) => resolve ( null ) ) ) ;
154154
155- disposables . push ( inputBox . onDidChangeValue ( async ( e ) => {
155+ disposables . push ( inputBox . onDidChangeValue ( ( e ) => {
156156 if ( validator . isURL ( inputBox . value ) ) {
157157 inputBox . validationMessage = undefined ;
158158 } else {
159159 inputBox . validationMessage = 'Please enter a valid URL' ;
160160 }
161161
162- //check the mentioned url has image referece
163- inputBox . validationMessage = 'Checking the image info'
164- inputBox . enabled = false ;
165- if ( ! await Oc . Instance . hasImageInfo ( inputBox . value ) ) {
166- inputBox . validationMessage = 'Image referece is not valid'
167- } else {
168- inputBox . validationMessage = undefined ;
169- }
170- inputBox . enabled = true ;
171-
172162 } ) ) ;
173163
174- disposables . push ( inputBox . onDidAccept ( ( e ) => {
164+ disposables . push ( inputBox . onDidAccept ( async ( _e ) => {
165+
166+ //check url has image
167+ if ( inputBox . validationMessage === undefined && inputBox . value !== undefined ) {
168+ if ( ! await Oc . Instance . hasImageInfo ( inputBox . value ) ) {
169+ inputBox . validationMessage = 'Image referece is not valid'
170+ } else {
171+ inputBox . validationMessage = undefined ;
172+ }
173+ }
174+
175175 if ( inputBox . validationMessage === undefined && inputBox . value !== undefined ) {
176176 resolve ( inputBox . value ) ;
177177 inputBox . hide ( ) ;
You can’t perform that action at this time.
0 commit comments