Truncated code in JS file