소스 검색

fix Event import

tripeur 4 년 전
부모
커밋
42a9dcb404
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      lib/Event.js
  2. 0 0
      lib/Event.js.map
  3. 2 2
      src/Event.ts

+ 2 - 2
lib/Event.js

@@ -65,11 +65,11 @@ class Event {
         }
         const start = dayjs_1.default(obj.start);
         const end = dayjs_1.default(obj.end);
-        if (start.isValid()) {
+        if (!start.isValid()) {
             throw new Error(`Error during the import of the Event '${obj.id}': Invalid starting date`);
         }
         else {
-            if (end.isValid()) {
+            if (!end.isValid()) {
                 throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`);
             }
             else {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
lib/Event.js.map


+ 2 - 2
src/Event.ts

@@ -92,10 +92,10 @@ export class Event implements IEvent, Selectable{
 
         const start = dayjs(obj.start)
         const end = dayjs(obj.end)
-        if(start.isValid()){
+        if(!start.isValid()){
             throw new Error(`Error during the import of the Event '${obj.id}': Invalid starting date`)
         }else{
-        if(end.isValid()){
+        if(!end.isValid()){
             throw new Error(`Error during the import of the Event '${obj.id}': Invalid ending date`)
         }else{
             

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.