also looking at this
fix(ios): hand the page the answers native was already sending
#222
18 files
+597
-164
| @@ -128,7 +128,14 @@ export function useHaptic() { | ||
| 128 | 128 | console.warn('Craft not ready'); |
| 129 | 129 | return; |
| 130 | 130 | } |
| 131 | await craft.value.haptic(type); | |
| 131 | try { | |
| 132 | await craft.value.haptic(type); | |
| 133 | } | |
| 134 | catch (error) { | |
| 135 | // Feedback: an app built with haptics off plays nothing, the same as | |
| 136 | // Craft not being ready. Any other failure still reaches the caller. | |
| 137 | if ((error as { code?: string } | null)?.code !== 'CAPABILITY_DISABLED') throw error; | |
| 138 | } | |
| 132 | 139 | }; |
| 133 | 140 | |
| 134 | 141 | return { haptic }; |