📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP →

vue-intersect

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-intersect - npm Package Compare versions

Comparing version

to
1.1.4

@@ -9,3 +9,3 @@ import Vue from 'vue/dist/vue.js'

test('It should be a function', () => {
expect(typeof Intersect.created).toBe('function')
expect(typeof Intersect.mounted).toBe('function')
})

@@ -27,3 +27,2 @@

const spy = {
created: jest.spyOn(mockedIntersect, 'created'),
mounted: jest.spyOn(mockedIntersect, 'mounted')

@@ -41,3 +40,2 @@ }

expect(spy.created).toHaveBeenCalledTimes(1)
expect(spy.mounted).toHaveBeenCalledTimes(1)

@@ -44,0 +42,0 @@

{
"name": "vue-intersect",
"version": "1.1.3",
"version": "1.1.4",
"description": "A Vue component to add intersection-observer to a Vue component or HTML element.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -19,3 +19,3 @@ import Vue from 'vue'

root: {
type: HTMLElement,
type: typeof HTMLElement !== 'undefined' ? HTMLElement : Object,
required: false,

@@ -30,3 +30,3 @@ default: () => null

},
created () {
mounted () {
this.observer = new IntersectionObserver((entries) => {

@@ -45,4 +45,3 @@ if (!entries[0].isIntersecting) {

})
},
mounted () {
this.$nextTick(() => {

@@ -49,0 +48,0 @@ if (this.$slots.default && this.$slots.default.length > 1) {