@@ -1,6 +1,6 @@
# Alpine JS `x-autoanimate`
-Alpine JS wrapper `x-autoanimate` allows you to use [FormKit AutoAnimate](https://auto-animate.formkit.com/) with [AlpineJS](https://alpinejs.dev/)
+Alpine JS plugin `x-autoanimate` allows you to use [FormKit AutoAnimate](https://auto-animate.formkit.com/) with [AlpineJS](https://alpinejs.dev/)
## Example
@@ -1,7 +1,7 @@
{
"name": "alpinejs-autoanimate",
- "version": "1.0.7",
- "description": "AlpineJS autoAnimate",
+ "version": "1.0.10",
+ "description": "AlpineJS AutoAnimate",
"type": "module",
"keywords": [
"Alpine",
@@ -2,6 +2,6 @@ import autoAnimate from "@formkit/auto-animate";
export default function (Alpine) {
Alpine.directive("autoanimate", (el, { expression }, { evaluate }) => {
- autoAnimate(el, evaluate(expression) || {});
+ autoAnimate(el, (expression && evaluate(expression)) || {});
});
}