Skip to content

Commit 11084f2

Browse files
committed
Merge branch 'master' of https://github.com/Akryum/v-tooltip
2 parents 12a8dab + 213c5a8 commit 11084f2

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,40 @@
66

77
Install deps:
88

9-
```
9+
```sh
1010
yarn
1111
```
1212

1313
Run the tests:
1414

15-
```
15+
```sh
1616
yarn run test:unit --watch
1717
```
1818

1919
Build the library in dev mode:
2020

21-
```
21+
```sh
2222
yarn run dev
2323
```
2424

2525
Build the library for production:
2626

27-
```
27+
```sh
2828
yarn run build
2929
```
3030

3131
### Demo
3232

3333
Run the demo:
3434

35-
```
35+
```sh
3636
cd demo-src
3737
yarn
3838
yarn run dev
3939
```
4040

4141
Build the demo:
4242

43-
```
43+
```sh
4444
yarn run build
4545
```

src/lib/tooltip.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ export default class Tooltip {
241241
_setContent (content, options) {
242242
this.asyncContent = false
243243
this._applyContent(content, options).then(() => {
244+
if (!this.popperInstance) return;
244245
this.popperInstance.update()
245246
})
246247
}
@@ -420,7 +421,9 @@ export default class Tooltip {
420421
this._tooltipNode.style.display = 'none'
421422
this._tooltipNode.setAttribute('aria-hidden', 'true')
422423

423-
this.popperInstance.disableEventListeners()
424+
if (this.popperInstance) {
425+
this.popperInstance.disableEventListeners()
426+
}
424427

425428
clearTimeout(this._disposeTimer)
426429
const disposeTime = directive.options.disposeTimeout

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue, { VueConstructor, DirectiveOptions, PluginFunction } from 'vue';
22

3-
const vToolTip: PluginFunction<any>;
3+
declare const vToolTip: PluginFunction<any>;
44
export default vToolTip;
55

66
export const VPopover: VueConstructor<Vue>;

0 commit comments

Comments
 (0)