@speakableio/core 1.0.57 → 1.0.58

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.
@@ -1014,6 +1014,17 @@ async function getAssignmentScore({
1014
1014
  id: result.id
1015
1015
  };
1016
1016
  }
1017
+ if (response.data.cards == null) {
1018
+ try {
1019
+ await api.updateDoc(path, { cards: {} });
1020
+ } catch (error) {
1021
+ console.error("Error initializing score cards:", error);
1022
+ }
1023
+ return {
1024
+ ...response.data,
1025
+ cards: {}
1026
+ };
1027
+ }
1017
1028
  return response.data;
1018
1029
  }
1019
1030
  async function getPracticeScore({ userId, setId }) {