From 5e5cef0bdace24ca95c852bb7dbf201cbb2a6b2b Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Mon, 25 Apr 2022 08:20:48 -0400 Subject: [PATCH 1/3] Fixed issue targeting legacy scenes that have no name crashing the application --- src/components/structural/header/ProjectView.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/structural/header/ProjectView.js b/src/components/structural/header/ProjectView.js index 5ffb0e5a..36eddd12 100644 --- a/src/components/structural/header/ProjectView.js +++ b/src/components/structural/header/ProjectView.js @@ -373,13 +373,15 @@ class Project extends React.Component { * @returns 1 if project a should come before project b, -1 if b should come before a */ projectSort = (a,b)=>{ - if(a.name.toUpperCase() < b.name.toUpperCase()) - { - return -1; - } - else if(a.name.toUpperCase() > b.name.toUpperCase()) - { - return 1; + if(a.name) { + if(a.name.toUpperCase() < b.name.toUpperCase()) + { + return -1; + } + else if(a.name.toUpperCase() > b.name.toUpperCase()) + { + return 1; + } } else if(a.updateTime > b.updateTime) { From 11c02884cd222f6e300085832fc4eeffdc61e7fe Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Mon, 25 Apr 2022 08:42:15 -0400 Subject: [PATCH 2/3] Updated check to verify both scenes in projectSort --- src/components/structural/header/ProjectView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structural/header/ProjectView.js b/src/components/structural/header/ProjectView.js index 36eddd12..0294c522 100644 --- a/src/components/structural/header/ProjectView.js +++ b/src/components/structural/header/ProjectView.js @@ -373,7 +373,7 @@ class Project extends React.Component { * @returns 1 if project a should come before project b, -1 if b should come before a */ projectSort = (a,b)=>{ - if(a.name) { + if(a.name && b.name) { if(a.name.toUpperCase() < b.name.toUpperCase()) { return -1; From 9cdfdfb080f76fbe309b4a5ebc2d8288963d6e64 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Mon, 25 Apr 2022 11:11:27 -0400 Subject: [PATCH 3/3] Release notes for 3.1.2 --- README.md | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0f4793d6..3a8f078a 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,8 @@ The Engaging Computing Group develops new technologies to enable learners—yout ## Status [![CircleCI](https://circleci.com/gh/engaging-computing/MYR.svg?style=shield)](https://circleci.com/gh/engaging-computing/MYR) -## Change Log - 3.1.0 -> 3.1.1 -- Patched font-size bug, previously changing font-size would clear code in the editor -- Dependency updates -- nvmrc file updated (10.13 -> 12.18) +## Change Log - 3.1.1 -> 3.1.2 +- Fixed a bug where an old scene without a name can crash the client view ## Acknowledgments diff --git a/package.json b/package.json index 1ec44904..e3669ed6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "myr", - "version": "3.1.1", + "version": "3.1.2", "private": false, "engines": { "node": "^12.18.2"