Update pattern.js