@medplum/react 2.0.10 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1285,10 +1285,17 @@
1285
1285
  const medplum = useMedplum();
1286
1286
  const [outcome, setOutcome] = React.useState();
1287
1287
  const issues = getIssuesForExpression(outcome, undefined);
1288
- React.useEffect(() => initRecaptcha(recaptchaSiteKey), [recaptchaSiteKey]);
1288
+ React.useEffect(() => {
1289
+ if (recaptchaSiteKey) {
1290
+ initRecaptcha(recaptchaSiteKey);
1291
+ }
1292
+ }, [recaptchaSiteKey]);
1289
1293
  return (React.createElement(Form, { style: { maxWidth: 400 }, onSubmit: async (formData) => {
1290
1294
  try {
1291
- const recaptchaToken = await getRecaptcha(recaptchaSiteKey);
1295
+ let recaptchaToken = '';
1296
+ if (recaptchaSiteKey) {
1297
+ recaptchaToken = await getRecaptcha(recaptchaSiteKey);
1298
+ }
1292
1299
  props.handleAuthResponse(await medplum.startNewUser({
1293
1300
  projectId: props.projectId,
1294
1301
  firstName: formData.firstName,
@@ -3768,7 +3775,7 @@
3768
3775
  return `Uploaded: ${formatFileSize(e.loaded)}`;
3769
3776
  }
3770
3777
  function formatFileSize(bytes) {
3771
- if (bytes == 0) {
3778
+ if (bytes === 0) {
3772
3779
  return '0.00 B';
3773
3780
  }
3774
3781
  const e = Math.floor(Math.log(bytes) / Math.log(1024));
@@ -6169,7 +6176,7 @@
6169
6176
  setIntervalGroups((groups) => {
6170
6177
  groups = [...groups];
6171
6178
  const currentGroupIndex = groups.findIndex((g) => g.id === groupId);
6172
- if (currentGroupIndex != -1) {
6179
+ if (currentGroupIndex !== -1) {
6173
6180
  const currentGroup = { ...groups[currentGroupIndex] };
6174
6181
  addedInterval = { ...addedInterval, ...currentGroup.filters };
6175
6182
  currentGroup.intervals = [...currentGroup.intervals, addedInterval];