diff --git a/index.html b/index.html
index 419d47c..60b672d 100644
--- a/index.html
+++ b/index.html
@@ -326,6 +326,7 @@
new Date().getTimezoneOffset() * 60000;
function random(begin = 10, end = 90, multiple = 10) {
+ return undefined
let k;
do {
k = Math.floor(Math.random() * 100);
diff --git a/src/bar.js b/src/bar.js
index 3701211..c915be0 100644
--- a/src/bar.js
+++ b/src/bar.js
@@ -56,7 +56,7 @@ export default class Bar {
this.compute_duration();
this.corner_radius = this.gantt.options.bar_corner_radius;
this.width = this.gantt.config.column_width * this.duration;
- if (this.task.progress < 0) this.task.progress = 0;
+ if (!this.task.progress || this.task.progress < 0) this.task.progress = 0;
if (this.task.progress > 100) this.task.progress = 100;
}
diff --git a/src/index.js b/src/index.js
index 6602861..054d3e2 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1335,7 +1335,6 @@ export default class Gantt {
bind_bar_progress() {
let x_on_start = 0;
- let y_on_start = 0;
let is_resizing = null;
let bar = null;
let $bar_progress = null;