From 2e2404747d51f1a6598d3655f036c679395ae320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Tue, 22 Sep 2020 13:53:53 +0200 Subject: [PATCH] Fix CopyExcitationsTypeFrom assertion --- static/js/data.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/data.js b/static/js/data.js index 2ca22751..aeb4ee7c 100644 --- a/static/js/data.js +++ b/static/js/data.js @@ -235,7 +235,9 @@ class dataFileBase { }) if (ex2 !== undefined) { if (DebugMode.Enabled) { - console.assert(ex.type == 0 || (ex2.type ^ (excitationTypes.Rydberg | excitationTypes.Valence) == ex.type ^ (excitationTypes.Rydberg | excitationTypes.Valence)), "Excitation type error", [ex, ex2, data.sourceFile]) + const restflag=ex.type.Value & ex2.type.Value + const result=restflag==ex.type.Value + console.assert(result, "Excitation type error", [ex, ex2, this.sourceFile]) } ex.type = ex2.type }