Fix JS test.

* `new Array` doesn't seem to be available in phantomJS yet.
This commit is contained in:
Guo Xiang Tan 2017-11-29 16:03:00 +08:00
parent 5b965ab5d0
commit 3e9c3f6f13

View File

@ -214,7 +214,8 @@ export default Ember.Component.extend({
const previewOffsetTop = $preview.offset().top;
const offset = $preview.scrollTop() - previewOffsetTop - ($input.offset().top - previewOffsetTop);
const nonEmptyList = [];
const scrollMap = Array(numberOfLines).fill(-1);
const scrollMap = [];
for (let i = 0; i < numberOfLines; i++) { scrollMap.push(-1); };
nonEmptyList.push(0);
scrollMap[0] = 0;