yasir commited on
Commit
5ca6eed
·
verified ·
1 Parent(s): 866a762

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +5 -0
script.js CHANGED
@@ -102,7 +102,12 @@ body: JSON.stringify(data)
102
  })
103
  .then(response => response.json())
104
  .then(data =>{
 
 
 
 
105
  fullPrompt=data.result
 
106
  })
107
  .catch((error) => {
108
  console.error('Error:', error);
 
102
  })
103
  .then(response => response.json())
104
  .then(data =>{
105
+ if(data.result == null){
106
+ fullPrompt=inp.value+prompt
107
+ }
108
+ else{
109
  fullPrompt=data.result
110
+ }
111
  })
112
  .catch((error) => {
113
  console.error('Error:', error);