From 1f89a0ef0bc4d7e9434b215caa620152513b36be Mon Sep 17 00:00:00 2001
From: Tor Hveem <tor@hveem.no>
Date: Wed, 10 Jun 2015 10:03:48 +0200
Subject: [PATCH] Use new version check

---
 js/models.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/models.js b/js/models.js
index efc93d0..84b223d 100644
--- a/js/models.js
+++ b/js/models.js
@@ -461,7 +461,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
      * @return active buffer pointer (WeeChat 1.0+) or fullname (older versions)
      */
     this.getActiveBufferReference = function() {
-        if (this.version !== null && parseInt(this.version.charAt(0)) >= 1) {
+        if (this.version !== null && this.version[0] >= 1) {
             // pointers are being validated, they're more reliable than
             // fullName (e.g. if fullName contains spaces)
             return "0x"+activeBuffer.id;