File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff 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 */
293293export 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
You can’t perform that action at this time.
0 commit comments