TypeError : text is undefinedの修正