My state constitution clarifies it as "The right of the individual citizen to bear arms in defense of himself, or the state..."
https://en.m.wikipedia.org/wiki/Second_Amendment_to_the_Unit...
This was true only between 2008 and 2010. In 2010, the Supreme Court clarified that it was incorporated against the states by the 14th Amendment.
And it was indeed the case well before 2008-2010. See United States v. Cruikshank (1875), Presser v. Illinois (1886), Miller v. Texas (1894).