Commit 067ece54 authored by Martin Santangelo's avatar Martin Santangelo
Browse files

(fix) comment vote counter is a string

parent 32389e01
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ export default class BaseModel {
      this['thumbs:' + direction + ':user_guids'] = [sessionService.guid, ...guids];
    }

    this['thumbs:' + direction + ':count'] += delta;
    this['thumbs:' + direction + ':count'] = parseInt(this['thumbs:' + direction + ':count'], 10) + delta;

    const params = this.getClientMetadata();

@@ -220,7 +220,7 @@ export default class BaseModel {
      } else {
        this['thumbs:' + direction + ':user_guids'] = [sessionService.guid, ...guids];
      }
      this['thumbs:' + direction + ':count'] -= delta;
      this['thumbs:' + direction + ':count'] = parseInt(this['thumbs:' + direction + ':count'], 10) - delta;
      throw err;
    }
  }