[js] fix for cp