File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @lambda-feedback-segp-sandbox/sandbox-addon" ,
3
- "version" : " 0.6.14 " ,
3
+ "version" : " 0.6.15 " ,
4
4
"description" : " lambda feedback sandbox addon" ,
5
5
"keywords" : [
6
6
" storybook-addons" ,
Original file line number Diff line number Diff line change @@ -31,24 +31,17 @@ export function Evaluate() {
31
31
const studentInput = sessionStorage . getItem ( "student.input" ) ;
32
32
33
33
// Safely parse the wizard input if it exists, otherwise use a fallback value
34
- let answer : { defaultAnswer : string } = { defaultAnswer : '' } ; // Default value for answer
34
+ let answer : string | object = "" ; // Default value for answer
35
35
36
36
try {
37
37
const wizardInput = sessionStorage . getItem ( "wizard.input" ) ;
38
38
39
39
// Safely parse the wizard input if it exists, otherwise use a fallback value
40
- if ( wizardInput ) {
41
- const parsedWizardInput = JSON . parse ( wizardInput ) ;
42
-
43
- // Ensure that parsedWizardInput.answer is a string or use fallback
44
- answer = parsedWizardInput ?. answer ?
45
- { defaultAnswer : String ( parsedWizardInput . answer ) } :
46
- { defaultAnswer : '' } ; // Fallback value if wizard.input is malformed
47
- }
40
+ answer = wizardInput ? JSON . parse ( wizardInput ) . answer : "" ;
48
41
} catch ( error ) { }
49
42
50
43
// Safely parse the student input if it exists, otherwise use a fallback value
51
- const response = studentInput ? parseStoredString ( studentInput ) : { defaultResponse : '' } ; // Fallback value if student.input is null
44
+ const response = studentInput ? parseStoredString ( studentInput ) : "" ; // Fallback value if student.input is null
52
45
53
46
console . log ( "remote eval" ) ;
54
47
console . log ( "url" , url ) ;
You can’t perform that action at this time.
0 commit comments