@khanacademy/perseus-editor 2.10.0 → 2.11.0

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.
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n$1);
61
61
 
62
62
  // This file is processed by a Rollup plugin (replace) to inject the production
63
63
  const libName = "@khanacademy/perseus-editor";
64
- const libVersion = "2.10.0";
64
+ const libVersion = "2.11.0";
65
65
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
66
66
 
67
67
  function _extends() {
@@ -26765,9 +26765,6 @@ const {
26765
26765
  PropCheckBox: PropCheckBox$b,
26766
26766
  TexButtons
26767
26767
  } = perseus.components;
26768
- const {
26769
- getDependencies: getDependencies$2
26770
- } = perseus.Dependencies;
26771
26768
 
26772
26769
  // types for iterables
26773
26770
 
@@ -26775,11 +26772,12 @@ const parseAnswerKey = _ref => {
26775
26772
  let {
26776
26773
  key
26777
26774
  } = _ref;
26778
- const parsedKey = Number.parseInt(key ?? "");
26779
- if (Number.isNaN(parsedKey)) {
26780
- throw new Error(`Invalid answer key: ${key}`);
26781
- }
26782
- return parsedKey;
26775
+ // We don't throw here because there is data stored in some
26776
+ // exercises/articles where the answer forms don't have a key. If we throw,
26777
+ // it blocks content editors from loading the page at all.
26778
+ // TODO(Jeremy): find a way to handle these answer forms that are missing
26779
+ // keys more gracefully.
26780
+ return Number.parseInt(key ?? "");
26783
26781
  };
26784
26782
 
26785
26783
  // Pick a key that isn't currently used by an answer in answerForms
@@ -26894,7 +26892,7 @@ class ExpressionEditor extends React__namespace.Component {
26894
26892
  });
26895
26893
  const {
26896
26894
  TeX
26897
- } = getDependencies$2(); // OldExpression only
26895
+ } = perseus.Dependencies.getDependencies(); // OldExpression only
26898
26896
 
26899
26897
  buttonSetChoices.splice(1, 1, /*#__PURE__*/React__namespace.createElement("label", {
26900
26898
  key: "show-div"