Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

fixing issue where renderjson was throwing an exception in the install… #711

Merged
merged 2 commits into from
Aug 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions js/lib/renderjson.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// WARNING WARNING WARNING
// The way this module exports itself (the "module.exports = ") line has been modified
// from the original source, since the original way was not allowing this module to
// be imported (at least using ES6 syntax). If you update this file to a new version,
// unless the new version fixes the issue, please resurrect the tweaked part of this code.


// Copyright © 2013-2014 David Caldwell <david@porkrind.org>
//
// Permission to use, copy, modify, and/or distribute this software for any
Expand Down Expand Up @@ -50,8 +57,7 @@
// .object.syntax ("{", "}")
// .array.syntax ("[", "]")

var module;
(module||{}).exports = renderjson = (function() {
module.exports = (function() {
var themetext = function(/* [class, text]+ */) {
var spans = [];
while (arguments.length)
Expand Down
7 changes: 4 additions & 3 deletions js/views/modals/orderDetail/Contract.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import renderjson from '../../../lib/renderjson';
import { capitalize } from '../../../utils/string';
import BaseVw from '../../baseVw';
import loadTemplate from '../../../utils/loadTemplate';
Expand Down Expand Up @@ -75,16 +76,16 @@ export default class extends BaseVw {

if (contract) {
this.$('.js-jsonContractContainer')
.append(window.renderjson.set_show_to_level(1)(contract));
.append(renderjson.set_show_to_level(1)(contract));
} else {
if (buyerContract) {
this.$('.js-jsonBuyerContractContainer')
.append(window.renderjson.set_show_to_level(1)(buyerContract));
.append(renderjson.set_show_to_level(1)(buyerContract));
}

if (vendorContract) {
this.$('.js-jsonVendorContractContainer')
.append(window.renderjson.set_show_to_level(1)(vendorContract));
.append(renderjson.set_show_to_level(1)(vendorContract));
}
}
});
Expand Down