Had the same issue, but here's the solution
setTimeout(function () {
var scroll = new locomotiveScroll({
el: document.querySelector(".o-scroll"),
smooth: true,
getSpeed: true,
getDirection: true
});
scroll.on("scroll", function (t) {
document.documentElement.setAttribute("data-direction", t.direction);
});
}, 100);