From 618970298200e1367ca41e63d9bf696dc03cac77 Mon Sep 17 00:00:00 2001 From: themeteorchef Date: Mon, 7 Nov 2016 12:51:40 -0600 Subject: [PATCH] fix documentEditor module attaching validation to wrong ref --- imports/modules/document-editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/modules/document-editor.js b/imports/modules/document-editor.js index 4924337..3c4a6b7 100644 --- a/imports/modules/document-editor.js +++ b/imports/modules/document-editor.js @@ -21,7 +21,7 @@ const handleUpsert = () => { if (error) { Bert.alert(error.reason, 'danger'); } else { - component.form.reset(); + component.documentEditorForm.reset(); Bert.alert(confirmation, 'success'); browserHistory.push(`/documents/${insertedId || doc._id}`); } @@ -29,7 +29,7 @@ const handleUpsert = () => { }; const validate = () => { - $(component.form).validate({ + $(component.documentEditorForm).validate({ rules: { title: { required: true, @@ -50,7 +50,7 @@ const validate = () => { }); }; -export default function handleLogin(options) { +export default function documentEditor(options) { component = options.component; validate(); } -- 2.0.0