JonathansCornerCom
Status: New User - Welcome
Joined: 27 Jan 2009
Posts: 1
Back to top
Posted: Jan 27, 09, 7:20    JavaScript Cookie Script: Incomplete code cleanup?
At [link] , the Get_Cookie script includes:

:: Code ::
         return cookie_value;
         break;


Why is the break left in there after a return call?
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 1877
Location: East Coast, West Coast? I know it's one of them.
Back to top
Posted: Jan 27, 09, 13:00    
good point. Just an oversight, and you are the first person to note it after how many 10k's of downloads of this script.

I would imagine it was put in there originally just as a double safeguard in case for some weird reason the return wasn't instant or whatever, who knows, heh.
Display posts from previous:   

All times are GMT - 8 Hours