File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @gradio/core " : minor
3
+ " gradio " : minor
4
+ ---
5
+
6
+ feat: Fix frontend errors on ApiDocs and RecordingSnippet
Original file line number Diff line number Diff line change 806
806
on:close ={(event ) => {
807
807
set_api_docs_visible (false );
808
808
api_calls = [];
809
- api_recorder_visible = event .detail .api_recorder_visible ;
809
+ api_recorder_visible = event .detail ? .api_recorder_visible ;
810
810
}}
811
811
{dependencies }
812
812
{root }
Original file line number Diff line number Diff line change 145
145
{api_calls }
146
146
{dependencies }
147
147
{root }
148
+ api _prefix={app .api _prefix}
148
149
short _root={space _id || root }
149
150
{username }
150
151
/>
Original file line number Diff line number Diff line change 8
8
export let dependencies: Dependency [];
9
9
export let short_root: string ;
10
10
export let root: string ;
11
+ export let api_prefix = " " ;
11
12
export let current_language: " python" | " javascript" | " bash" ;
12
13
export let username: string | null ;
13
14
22
23
named_endpoints: any ;
23
24
unnamed_endpoints: any ;
24
25
}> {
25
- let response = await fetch (root + " info/?all_endpoints=true" );
26
+ let response = await fetch (
27
+ root .replace (/ \/ $ / , " " ) + api_prefix + " /info/?all_endpoints=true"
28
+ );
26
29
let data = await response .json ();
27
30
return data ;
28
31
}
@@ -160,8 +163,7 @@ const app = await Client.connect(<span class="token string">"{short_root}"</span
160
163
await client.predict(<span
161
164
class =" api-name" >
162
165
"/{api_name }"</span
163
- >{#if call },
164
- {/if }{call });
166
+ >{#if call }, {call }{/if });
165
167
{/each }</pre >
166
168
</div >
167
169
</code >
You can’t perform that action at this time.
0 commit comments