Best to check with a Bahamas embassy or consulate to be entirely 100% sure. But airlines typically use the TIMATIC database to verify travel documents. United has a page that lets you check that database no matter what airline you're actually flying:
United Airlines
When I did a sample search, I came up with a visa is normally required for Indonesia passport holders to the Bahamas, but the country allows transit without visa for a maximum three day stay. Verify this with an additional source.