enhancement(Activity): add toString method (#2313)

This commit is contained in:
SpaceEEC
2018-02-02 01:41:05 +01:00
committed by Isabella
parent 31873eb3a5
commit 016526486c

View File

@@ -134,6 +134,14 @@ class Activity {
);
}
/**
* When concatenated with a string, this automatically returns the activities's name instead of the Activity object.
* @returns {string}
*/
toString() {
return this.name;
}
_clone() {
return Object.assign(Object.create(this), this);
}