| @@ -18,8 +18,9 @@ | ||
| 18 | 18 | } from '@launch/api/WPApi'; |
| 19 | 19 | import { addIdAttributeToBlock } from '@launch/lib/blocks'; |
| 20 | 20 | import { recordPluginActivity } from '@shared/api/DataApi'; |
| 21 | 21 | import { pageNames } from '@shared/lib/pages'; |
| 22 | +import { processWithSecondPass } from '@shared/lib/patterns'; | |
| 22 | 23 | import apiFetch from '@wordpress/api-fetch'; |
| 23 | 24 | import { rawHandler, serialize } from '@wordpress/blocks'; |
| 24 | 25 | import { __, sprintf } from '@wordpress/i18n'; |
| 25 | 26 | |
| @@ -58,16 +59,9 @@ | ||
| 58 | 59 | source: 'launch', |
| 59 | 60 | }); |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | - try { | |
| 63 | - return await processPlaceholders(patterns); | |
| 64 | - } catch (_e) { | |
| 65 | - // Try one more time (plugins installed may not be fully loaded) | |
| 66 | - return await processPlaceholders(patterns) | |
| 67 | - // If this fails, just return the original patterns | |
| 68 | - .catch(() => patterns); | |
| 69 | - } | |
| 63 | + return await processWithSecondPass(processPlaceholders, patterns); | |
| 70 | 64 | }; |
| 71 | 65 | |
| 72 | 66 | export const createWpPages = async (pages, { stickyNav }) => { |
| 73 | 67 | const pageIds = []; |