From 4f86d30f4a0435d05d995e345508dca66c7a68da Mon Sep 17 00:00:00 2001 From: sainaen Date: Thu, 9 May 2013 00:22:08 +0300 Subject: Fix utils.getCurrentVersion() The code of this function before patch doesn't work for two reasons: 1) it makes async call, so it actually returns `undefined` 2) you need appropriate permission to call chrome.management.get() in manifest --- lib/utils.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/utils.coffee') diff --git a/lib/utils.coffee b/lib/utils.coffee index f089f89d..8d588a43 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -1,8 +1,6 @@ Utils = getCurrentVersion: -> - chrome.management.get(chrome.i18n.getMessage('@@extension_id'), (info) -> - info.version - ) + chrome.runtime.getManifest().version # Takes a dot-notation object string and call the function # that it points to with the correct value for 'this'. -- cgit v1.2.3