| 1016 | // check first if theme exists & we have themes in data |
| 1017 | if ( $theme.length && wp.themes.data.themes.length ) { |
| 1018 | |
| 1019 | // go through each theme data to search for currently updated theme |
| 1020 | wp.themes.data.themes.forEach( function( theme, index ) { |
| 1021 | |
| 1022 | // check if theme is currently updated one |
| 1023 | if( theme.id === response.slug ){ |
| 1024 | |
| 1025 | // change it's hasUpdate prop to false as it's already updated |
| 1026 | wp.themes.data.themes[index].hasUpdate = false; |
| 1027 | } |
| 1028 | |
| 1029 | }); |
| 1030 | } |
| 1031 | |