Commit 377e3e030f60c82b8cdd2c9355639348e61d3c15

Authored by Aresn
Committed by GitHub
2 parents 5f4a9bd5 e4bbb85d

Merge pull request #3441 from DebugIsFalse/transfer-dom

resolve the transfer-dom.js not support ie9
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
src/directives/transfer-dom.js
@@ -16,7 +16,7 @@ function getTarget (node) { @@ -16,7 +16,7 @@ function getTarget (node) {
16 16
17 const directive = { 17 const directive = {
18 inserted (el, { value }, vnode) { 18 inserted (el, { value }, vnode) {
19 - if (el.dataset.transfer !== 'true') return false; 19 + if ( el.dataset && el.dataset.transfer !== 'true') return false;
20 el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom'; 20 el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
21 const parentNode = el.parentNode; 21 const parentNode = el.parentNode;
22 if (!parentNode) return; 22 if (!parentNode) return;
@@ -38,7 +38,7 @@ const directive = { @@ -38,7 +38,7 @@ const directive = {
38 } 38 }
39 }, 39 },
40 componentUpdated (el, { value }) { 40 componentUpdated (el, { value }) {
41 - if (el.dataset.transfer !== 'true') return false; 41 + if ( el.dataset && el.dataset.transfer !== 'true') return false;
42 // need to make sure children are done updating (vs. `update`) 42 // need to make sure children are done updating (vs. `update`)
43 const ref$1 = el.__transferDomData; 43 const ref$1 = el.__transferDomData;
44 if (!ref$1) return; 44 if (!ref$1) return;
@@ -63,7 +63,7 @@ const directive = { @@ -63,7 +63,7 @@ const directive = {
63 } 63 }
64 }, 64 },
65 unbind (el) { 65 unbind (el) {
66 - if (el.dataset.transfer !== 'true') return false; 66 + if (el.dataset && el.dataset.transfer !== 'true') return false;
67 el.className = el.className.replace('v-transfer-dom', ''); 67 el.className = el.className.replace('v-transfer-dom', '');
68 const ref$1 = el.__transferDomData; 68 const ref$1 = el.__transferDomData;
69 if (!ref$1) return; 69 if (!ref$1) return;