Commit deef01f78bcce23dff6e6496779e7428b80920eb

Authored by Aresn
Committed by GitHub
2 parents 8c82b6f2 c43d1784

Merge pull request #3535 from carlosturnerbenites/pr/fix-spin-close

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 44 spin.visible = false;
45 45 setTimeout(function() {
46 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 50 cb();
49 51 }, 500);
50 52 },
... ... @@ -52,4 +54,4 @@ Spin.newInstance = properties => {
52 54 };
53 55 };
54 56  
55   -export default Spin;
56 57 \ No newline at end of file
  58 +export default Spin;
... ...