svelte-dnd-action
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -29,3 +29,3 @@ { | ||
"description": "*An awesome drag and drop library for Svelte 3 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"repository": { | ||
@@ -32,0 +32,0 @@ "type": "git", |
@@ -263,4 +263,4 @@ import { observe, unobserve } from './helpers/observer'; | ||
const config = { | ||
items: [], | ||
type: undefined, | ||
items: undefined, | ||
type: DEFAULT_DROP_ZONE_TYPE, | ||
flipDurationMs: 0, | ||
@@ -368,5 +368,5 @@ dragDisabled: false, | ||
function configure({ | ||
items = [], | ||
items = undefined, | ||
flipDurationMs:dropAnimationDurationMs = 0, | ||
type:newType = DEFAULT_DROP_ZONE_TYPE, | ||
type: newType = DEFAULT_DROP_ZONE_TYPE, | ||
dragDisabled = false, | ||
@@ -381,2 +381,9 @@ dropFromOthersDisabled = false, | ||
} | ||
if (!items) { | ||
throw new Error("no 'items' key provided to dndzone"); | ||
} | ||
const itemWithMissingId = items.find(item => !item.hasOwnProperty(ITEM_ID_KEY)); | ||
if (itemWithMissingId) { | ||
throw new Error(`missing '${ITEM_ID_KEY}' property for item ${toString(itemWithMissingId)}`); | ||
} | ||
config.dropAnimationDurationMs = dropAnimationDurationMs; | ||
@@ -383,0 +390,0 @@ if (config.type && newType !== config.type) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57049
995