We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57b53fd commit b34d5ddCopy full SHA for b34d5dd
src/components/Container.jsx
@@ -16,6 +16,7 @@ let Icon = (props) => {
16
}
17
18
let Version = (props) => {
19
+ if (!Extension.isExtension()) return <span />
20
return (
21
<a className={styles.version} href="https://github.com/jessepollak/command/releases" target="_blank">
22
Private beta v{ Extension.getVersion() }
src/lib/extension.js
@@ -1,3 +1,8 @@
1
+export function isExtension() {
2
+ return !!(window.chrome && window.chrome.runtime && window.chrome.runtime.getManifest)
3
+}
4
export function getVersion() {
- return chrome.runtime.getManifest().version
5
+ if (isExtension()) {
6
+ return chrome.runtime.getManifest().version
7
+ }
8
0 commit comments