Skip to content

Commit 0522042

Browse files
committed
refactor: Remove unused return value
This utility is solely used to await the availability of the bridge configuration. The value itself is retrieved via `getGBKit()`.
1 parent 58af152 commit 0522042

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/utils/bridge.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -288,33 +288,23 @@ export function logException(
288288
*
289289
* @param {number} timeoutMs Timeout in milliseconds after which to reject.
290290
*
291-
* @return {Promise<GBKitConfig>} Promise that resolves with GBKit config or rejects after timeout.
291+
* @return {Promise<void>} Promise that resolves with GBKit config or rejects after timeout.
292292
*/
293293
export function awaitGBKitGlobal( timeoutMs = 3000 ) {
294294
return new Promise( ( resolve, reject ) => {
295295
const startTime = Date.now();
296296

297297
const checkGBKit = () => {
298298
if ( window.GBKit ) {
299-
resolve( window.GBKit );
299+
resolve();
300300
return;
301301
}
302302

303303
if ( Date.now() - startTime >= timeoutMs ) {
304-
// In development mode, bypass the GBKit requirement and seed a default post,
305-
// allowing the editor to load without the native bridge to simplify testing.
304+
// In development mode, bypass the GBKit requirement allowing the editor
305+
// to load without the native bridge to simplify testing.
306306
if ( isDevMode() ) {
307-
resolve( {
308-
post: {
309-
id: -1,
310-
type: 'post',
311-
title: '',
312-
content: '',
313-
status: 'auto-draft',
314-
},
315-
themeStyles: false,
316-
hideTitle: false,
317-
} );
307+
resolve();
318308
return;
319309
}
320310

0 commit comments

Comments
 (0)