It is the second option because optimist is someone who is hopeful.
I feel that the first one would be the correct answer, because the definition of a dangling modifier is as follows; <span>a word or phrase that modifies a word not clearly stated in the sentence. A </span>modifier<span> describes, clarifies, or gives more detail about a concept. </span>
Some kids love basketball but they also love basketball