Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Put back cache buster
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed May 10, 2023
1 parent 2b2ad3b commit e17a317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Assets/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct( Package $package ) {
* @return string The cache buster value to use for the given file.
*/
protected function get_file_version( $file ) {
if ( file_exists( $this->package->get_path() . $file ) ) {
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( $this->package->get_path() . $file ) ) {
return filemtime( $this->package->get_path( trim( $file, '/' ) ) );
}
return $this->package->get_version();
Expand Down

0 comments on commit e17a317

Please sign in to comment.