]> git.xn--bdkaa.com Git - where-are-you.py.git/commitdiff
Empty tips varlamov fix
authorzharkovstas <zharkovstas@skbkontur.ru>
Sun, 19 May 2019 07:34:08 +0000 (12:34 +0500)
committerzharkovstas <zharkovstas@skbkontur.ru>
Sun, 19 May 2019 07:34:23 +0000 (12:34 +0500)
src/GameController.js

index 85ca4f64932afe6a4e310fe27bb43c5031e57585..888cba3a5c7d61d0cd26e901527f5941aa969eb6 100644 (file)
@@ -64,7 +64,7 @@ export class GameController {
     if(!this._tips) {
       return [];
     }
-    if(this.varlamov) {
+    if(this.varlamov && this._tips.length) {
       const match = this._tips[this._tips.length - 1].match(/высотой в (.) этажей/);
       if(match && match[1]) {
         const num = parseInt(match[1], 10);