diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 35f8032..b20a783 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -1038,7 +1038,7 @@ function _locale_rebuild_js($langcode = NULL) {
     file_prepare_directory($dir, FILE_CREATE_DIRECTORY);
 
     // Save the file.
-    if (file_unmanaged_save_data($data, $dest)) {
+    if (file_unmanaged_save_data($data, $dest, FILE_EXISTS_REPLACE)) {
       $locale_javascripts[$language->langcode] = $data_hash;
       // If we deleted a previous version of the file and we replace it with a
       // new one we have an update.
