Skip to content

Commit 4f86d30

Browse files
committed
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
1 parent 6c87a84 commit 4f86d30

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/utils.coffee

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Utils =
22
getCurrentVersion: ->
3-
chrome.management.get(chrome.i18n.getMessage('@@extension_id'), (info) ->
4-
info.version
5-
)
3+
chrome.runtime.getManifest().version
64

75
# Takes a dot-notation object string and call the function
86
# that it points to with the correct value for 'this'.

0 commit comments

Comments
 (0)