undo(graphics, object) {
    return new Promise((resolve, reject) => {
      if (graphics.contains(object)) {
        graphics.remove(object);
        resolve(object);
      } else {
        reject(rejectMessages.noObject);
      }
    });
  }
@param {Graphics} graphics - Graphics instance
@param {Object} object - Fabric object
@returns {Promise}