Skip to content

Commit 9f7ceef

Browse files
committed
Remove Object.keys and replace with compatible method
1 parent f57b76c commit 9f7ceef

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "particles-bg-vue",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Vue.js component for particles backgrounds",
55
"author": "creotip@gmail.com",
66
"license": "MIT",

src/particles-bg/index.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import ParticlesBg from './ParticlesBg'
1+
import ParticlesBg from "./ParticlesBg";
22

33
const components = {
4-
ParticlesBg
5-
}
4+
ParticlesBg: ParticlesBg
5+
};
66

7-
const install = function (Vue) {
8-
if (install.installed) return
9-
Object.keys(components).forEach(key => {
10-
Vue.component(components[key].name, components[key])
11-
})
12-
}
7+
const install = function(Vue) {
8+
if (install.installed) return;
9+
10+
for (let key in components) {
11+
Vue.component(components[key].name, components[key]);
12+
}
13+
};
1314

14-
if (typeof window !== 'undefined' && window.Vue) {
15-
install(window.Vue)
15+
if (typeof window !== "undefined" && window.Vue) {
16+
install(window.Vue);
1617
}
1718

1819
const VueParticlesBg = {
@@ -21,4 +22,4 @@ const VueParticlesBg = {
2122
};
2223

2324
export { ParticlesBg };
24-
export default VueParticlesBg;
25+
export default VueParticlesBg;

0 commit comments

Comments
 (0)