Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 6674b5d

Browse files
committed
Fixed repeat function before release
display.min.js didn't handled the repeat function until now.
1 parent 87b7c33 commit 6674b5d

File tree

8 files changed

+12
-14
lines changed

8 files changed

+12
-14
lines changed

__test__/display.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ class DisplayJS {
188188
return list;
189189
}
190190
// custom repeat function
191-
repeat(el, object, position="in") {
191+
repeat(el, object) {
192192
el = this.s(el);
193193
const text = el[0].innerHTML;
194194
el[0].innerHTML = ""
195195
// Comes from stackoveflow. @Individual11
196196
function interpolate(str) {
197197
return function interpolate(o) {
198198
return str.replace(/{([^{}]*)}/g, function(a, b) {
199-
const data = o;
199+
window["data"] = o;
200200
let r = eval(b)
201201
return r
202202
});

dist/display.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ class DisplayJS {
188188
return list;
189189
}
190190
// custom repeat function
191-
repeat(el, object, position="in") {
191+
repeat(el, object) {
192192
el = this.s(el);
193193
const text = el[0].innerHTML;
194194
el[0].innerHTML = ""
195195
// Comes from stackoveflow. @Individual11
196196
function interpolate(str) {
197197
return function interpolate(o) {
198198
return str.replace(/{([^{}]*)}/g, function(a, b) {
199-
const data = o;
199+
window["data"] = o;
200200
let r = eval(b)
201201
return r
202202
});

dist/display.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/display.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ class DisplayJS {
188188
return list;
189189
}
190190
// custom repeat function
191-
repeat(el, object, position="in") {
191+
repeat(el, object) {
192192
el = this.s(el);
193193
const text = el[0].innerHTML;
194194
el[0].innerHTML = ""
195195
// Comes from stackoveflow. @Individual11
196196
function interpolate(str) {
197197
return function interpolate(o) {
198198
return str.replace(/{([^{}]*)}/g, function(a, b) {
199-
const data = o;
199+
window["data"] = o;
200200
let r = eval(b)
201201
return r
202202
});

dist/light/display.es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/display.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,14 @@ var DisplayJS = function () {
242242
}, {
243243
key: "repeat",
244244
value: function repeat(el, object) {
245-
var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "in";
246-
247245
el = this.s(el);
248246
var text = el[0].innerHTML;
249247
el[0].innerHTML = "";
250248
// Comes from stackoveflow. @Individual11
251249
function interpolate(str) {
252250
return function interpolate(o) {
253251
return str.replace(/{([^{}]*)}/g, function (a, b) {
254-
var data = o;
252+
window["data"] = o;
255253
var r = eval(b);
256254
return r;
257255
});

0 commit comments

Comments
 (0)