File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -90,22 +90,16 @@ const server = patternlab => {
90
90
return new Promise ( ( resolve , reject ) => {
91
91
let action ;
92
92
try {
93
- const reloadInterval = setInterval ( ( ) => {
94
- if ( ! patternlab . isBusy ) {
95
- if (
96
- _data . file . indexOf ( 'css' ) > - 1 ||
97
- _data . action === 'refresh'
98
- ) {
99
- action = 'refreshed CSS' ;
100
- liveServer . refreshCSS ( ) ;
101
- } else {
102
- action = 'reloaded' ;
103
- liveServer . reload ( ) ;
104
- }
105
- clearInterval ( reloadInterval ) ;
106
- resolve ( `Server ${ action } successfully` ) ;
93
+ if ( ! patternlab . isBusy ) {
94
+ if ( _data . file . indexOf ( 'css' ) > - 1 || _data . action === 'refresh' ) {
95
+ action = 'refreshed CSS' ;
96
+ liveServer . refreshCSS ( ) ;
97
+ } else {
98
+ action = 'reloaded' ;
99
+ liveServer . reload ( ) ;
107
100
}
108
- } , 1000 ) ;
101
+ resolve ( `Server ${ action } successfully` ) ;
102
+ }
109
103
} catch ( e ) {
110
104
reject ( `Server reload or refresh failed: ${ e } ` ) ;
111
105
}
You can’t perform that action at this time.
0 commit comments