makeup-navigation-emitter
Advanced tools
@@ -136,7 +136,7 @@ 'use strict'; | ||
set: function set(newIndex) { | ||
if (newIndex !== this.index) { | ||
if (newIndex > -1 && newIndex < this.items.length && newIndex !== this.index) { | ||
this._el.dispatchEvent(new CustomEvent('navigationModelChange', { | ||
detail: { | ||
toIndex: newIndex, | ||
fromIndex: this.index | ||
fromIndex: this.index, | ||
toIndex: newIndex | ||
}, | ||
@@ -143,0 +143,0 @@ bubbles: false |
{ | ||
"name": "makeup-navigation-emitter", | ||
"description": "Emits custom events based on keyboard navigation of one or two dimensional model", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/makeup-js/makeup-navigation-emitter.git", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
239713
0.32%0
-100%