Fix bug JS when sharing file.