timuric/Content-generator-sketch-plugin — pull request #43 by sixsided (2014-11-05 22:07:40+00:00)
Title: fix off-by-one error in loadImage.js

loadImages rounds up rather than down when choosing a random index from 0 to the number of images available, causing it to sometimes exceed by one the number of available images. It throws an exception and none of the placeholder images appear in Sketch.

This isn't likely to happen when there are a thousand+ images, as there are in data/photos/persona/men, but I ran into it when I replaced those images with a smaller set of my own.