Skip to content

Commit 8f3c869

Browse files
committed
Fix typecheck errors
1 parent 49ab6a1 commit 8f3c869

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Diff for: src/ui/buttons/buttons.test.js

+6
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,17 @@ describe("Smart Payment Buttons - limit button to PayPal for FSS", () => {
156156
fundingEligibility,
157157
};
158158

159+
// $FlowFixMe
159160
const jsxElems = Buttons(mockedButtonProps);
160161

161162
const allButtonsTotalCount = jsxElems?.children.filter(
163+
// $FlowFixMe
162164
(elem) => elem?.component?.name === "Button"
163165
).length;
164166

165167
const hasPayPalButton =
166168
jsxElems?.children.filter(
169+
// $FlowFixMe
167170
(elem) => elem?.props?.fundingSource === "paypal"
168171
).length === 1;
169172

@@ -179,14 +182,17 @@ describe("Smart Payment Buttons - limit button to PayPal for FSS", () => {
179182
fundingEligibility,
180183
};
181184

185+
// $FlowFixMe
182186
const jsxElems = Buttons(mockedButtonProps);
183187

184188
const allButtonsTotalCount = jsxElems?.children.filter(
189+
// $FlowFixMe
185190
(elem) => elem?.component?.name === "Button"
186191
).length;
187192

188193
const hasPayPalButton =
189194
jsxElems?.children.filter(
195+
// $FlowFixMe
190196
(elem) => elem?.props?.fundingSource === "paypal"
191197
).length === 1;
192198

Diff for: src/ui/buttons/props.js

+1
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ export type ButtonPropsInputs = {
597597
message?: ButtonMessageInputs | void,
598598
messageMarkup?: string | void,
599599
renderedButtons: $ReadOnlyArray<$Values<typeof FUNDING>>,
600+
isFsSubscription: boolean,
600601
};
601602

602603
export const DEFAULT_STYLE = {

Diff for: src/zoid/buttons/component.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
620620
required: false,
621621
value: ({ props }) =>
622622
props.createSubscription &&
623-
getSDKToken() &&
623+
Boolean(getSDKToken()) &&
624624
props.intent !== "subscription",
625625
},
626626

0 commit comments

Comments
 (0)