Commit c43d1784803445243b15a8e2f4c2def29d616c2d

Authored by Carlos Alonso Turner Benites
1 parent ca1b7bfa

fix: calling Spin.hide() continuously

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
src/components/spin/spin.js
@@ -44,7 +44,9 @@ Spin.newInstance = properties => { @@ -44,7 +44,9 @@ Spin.newInstance = properties => {
44 spin.visible = false; 44 spin.visible = false;
45 setTimeout(function() { 45 setTimeout(function() {
46 spin.$parent.$destroy(); 46 spin.$parent.$destroy();
47 - document.body.removeChild(document.getElementsByClassName('ivu-spin-fullscreen')[0]); 47 + if (document.getElementsByClassName('ivu-spin-fullscreen')[0] !== undefined) {
  48 + document.body.removeChild(document.getElementsByClassName('ivu-spin-fullscreen')[0]);
  49 + }
48 cb(); 50 cb();
49 }, 500); 51 }, 500);
50 }, 52 },
@@ -52,4 +54,4 @@ Spin.newInstance = properties => { @@ -52,4 +54,4 @@ Spin.newInstance = properties => {
52 }; 54 };
53 }; 55 };
54 56
55 -export default Spin;  
56 \ No newline at end of file 57 \ No newline at end of file
  58 +export default Spin;