Skip to content

Commit

Permalink
make conditions more specific and remove debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Oct 16, 2023
1 parent c9539fb commit da38215
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/Challenge/Challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ export const fetchChallenges = function (
// it into JSON first.
if (!challengeData.taskWidgetLayout.workspace && challengeData.taskWidgetLayout) {
try {
if (!JSON.parse(challengeData.taskWidgetLayout).workspace) {
if (!(JSON.parse(challengeData.taskWidgetLayout).workspace.name === "taskCompletion")) {
throw new Error("Widget layout with the wrong format was submitted, it was not included in the save.")
}
challengeData.taskWidgetLayout = JSON.parse(challengeData.taskWidgetLayout)
Expand Down
2 changes: 1 addition & 1 deletion src/services/Widget/Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export const importRecommendedConfiguration = (recommendedLayout) => {
importedConfiguration.widgets =
_map(importedConfiguration.widgetKeys, key => widgetDescriptor(key))
delete importedConfiguration.widgetKeys
debugger

_each(importedConfiguration.layout, taskWidgetLayout => taskWidgetLayout.i = generateWidgetId())
return (importedConfiguration)
}
Expand Down

0 comments on commit da38215

Please sign in to comment.