Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ddc7e41

Browse files
Revert the merge because it introduced some unexpected bugs. Revisit later
1 parent 121a508 commit ddc7e41

File tree

3 files changed

+2
-37
lines changed

3 files changed

+2
-37
lines changed

‎st.js‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(function() {
22
var $context = this;
33
var root; // root context
4-
var _stringify;
54
var Helper = {
65
is_template: function(str) {
76
var re = /\{\{(.+)\}\}/g;
@@ -671,7 +670,6 @@
671670
},
672671
// returns the object itself
673672
select: function(obj, filter, serialized) {
674-
JSON.stringify = overriddenStringify;
675673
// iterate '$selected'
676674
//
677675
/*
@@ -843,7 +841,6 @@
843841

844842
// Terminal methods
845843
objects: function() {
846-
JSON.stringify = _stringify;
847844
SELECT.$progress = null;
848845
if (SELECT.$selected) {
849846
return SELECT.$selected.map(function(item) { return item.object; });
@@ -852,7 +849,6 @@
852849
}
853850
},
854851
keys: function() {
855-
JSON.stringify = _stringify;
856852
SELECT.$progress = null;
857853
if (SELECT.$selected) {
858854
return SELECT.$selected.map(function(item) { return item.key; });
@@ -865,7 +861,6 @@
865861
}
866862
},
867863
paths: function() {
868-
JSON.stringify = _stringify;
869864
SELECT.$progress = null;
870865
if (SELECT.$selected) {
871866
return SELECT.$selected.map(function(item) { return item.path; });
@@ -884,7 +879,6 @@
884879
}
885880
},
886881
values: function() {
887-
JSON.stringify = _stringify;
888882
SELECT.$progress = null;
889883
if (SELECT.$selected) {
890884
return SELECT.$selected.map(function(item) { return item.value; });
@@ -893,15 +887,14 @@
893887
}
894888
},
895889
root: function() {
896-
JSON.stringify = _stringify;
897890
SELECT.$progress = null;
898891
return SELECT.$selected_root;
899892
},
900893
};
901894

902895
// Native JSON object override
903-
_stringify = JSON.stringify;
904-
varoverriddenStringify = function(val, replacer, spaces) {
896+
var_stringify = JSON.stringify;
897+
JSON.stringify = function(val, replacer, spaces) {
905898
var t = typeof val;
906899
if (['number', 'string', 'boolean'].indexOf(t) !== -1) {
907900
return _stringify(val, replacer, spaces);

‎test/integration/index.html‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,5 @@
3434
}
3535
}, data);
3636

37-
var sample_json = JSON.stringify({
38-
"key": "{{this}}"
39-
})
40-
console.log("stringified = ", sample_json)
41-
4237
</script>
4338
</html>

‎test/unit/exception.js‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /