Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Commit 15993fc

Browse files
committed
Fix: remove useless export default statement
1 parent 58c5255 commit 15993fc

File tree

3 files changed

+33
-35
lines changed

3 files changed

+33
-35
lines changed

dist/livewire-vue.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/livewire-vue.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,46 @@ if (typeof window.livewire === 'undefined') {
22
throw 'Livewire Vue Plugin: window.livewire is undefined. Make sure @livewireScripts is placed above this script include'
33
}
44

5-
export default function () {
6-
window.livewire.hook('beforeDomUpdate', (component, mutableHtmlContainer) => {
7-
if (! window.Vue) return
5+
window.livewire.hook('beforeDomUpdate', (component, mutableHtmlContainer) => {
6+
if (! window.Vue) return
87

9-
const div = document.createElement('div')
10-
div.innerHTML = mutableHtmlContainer.html
8+
const div = document.createElement('div')
9+
div.innerHTML = mutableHtmlContainer.html
1110

12-
new window.Vue().$mount(div.firstElementChild)
11+
new window.Vue().$mount(div.firstElementChild)
1312

14-
mutableHtmlContainer.html = div.firstElementChild.outerHTML
15-
})
13+
mutableHtmlContainer.html = div.firstElementChild.outerHTML
14+
})
1615

17-
window.livewire.hook('elementInitialized', el => {
18-
if (el.rawNode().__vue__) el.rawNode().__livewire_ignore = true
19-
})
16+
window.livewire.hook('elementInitialized', el => {
17+
if (el.rawNode().__vue__) el.rawNode().__livewire_ignore = true
18+
})
2019

21-
window.livewire.hook('interceptWireModelSetValue', (el, value) => {
22-
// If it's a vue component pass down the value prop.
23-
if (! el.rawNode().__vue__) return
20+
window.livewire.hook('interceptWireModelSetValue', (el, value) => {
21+
// If it's a vue component pass down the value prop.
22+
if (! el.rawNode().__vue__) return
2423

25-
// Also, Vue will throw a warning because we are programmaticallly
26-
// setting a prop, we need to silence that.
27-
const originalSilent = window.Vue.config.silent
28-
window.Vue.config.silent = true
24+
// Also, Vue will throw a warning because we are programmaticallly
25+
// setting a prop, we need to silence that.
26+
const originalSilent = window.Vue.config.silent
27+
window.Vue.config.silent = true
2928

30-
el.rawNode().__vue__.$props.value = value
29+
el.rawNode().__vue__.$props.value = value
3130

32-
window.Vue.config.silent = originalSilent
33-
})
31+
window.Vue.config.silent = originalSilent
32+
})
3433

35-
window.livewire.hook('interceptWireModelAttachListener', (el, directive, component, debounceIf) => {
36-
// If it's a vue component pass down the value prop.
37-
if (! el.rawNode().__vue__) return
34+
window.livewire.hook('interceptWireModelAttachListener', (el, directive, component, debounceIf) => {
35+
// If it's a vue component pass down the value prop.
36+
if (! el.rawNode().__vue__) return
3837

39-
const hasDebounceModifier = directive.modifiers.includes('debounce')
40-
const isLazy = directive.modifiers.includes('lazy')
38+
const hasDebounceModifier = directive.modifiers.includes('debounce')
39+
const isLazy = directive.modifiers.includes('lazy')
4140

42-
el.rawNode().__vue__.$on('input', debounceIf(hasDebounceModifier || ! isLazy, e => {
43-
const model = directive.value
44-
const value = e
41+
el.rawNode().__vue__.$on('input', debounceIf(hasDebounceModifier || ! isLazy, e => {
42+
const model = directive.value
43+
const value = e
4544

46-
component.set(model, value)
47-
}, directive.durationOr(150)))
48-
})
49-
}
45+
component.set(model, value)
46+
}, directive.durationOr(150)))
47+
})

0 commit comments

Comments
 (0)