res: fix undefined res issue
1.3.1