8000 sentry: fix undefined error by thelostone-mc · Pull Request #4583 · gitcoinco/web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sentry: fix undefined error #4583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 12, 2019
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
14 changes: 8 additions & 6 deletions app/assets/v2/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ $(document).ready(function() {
element.toggleClass('active');
let panel = element[0].nextElementSibling;

if (panel.style.maxHeight) {
panel.style.maxHeight = null;
panel.style.marginBottom = 0 + 'px';
} else {
panel.style.maxHeight = panel.scrollHeight + 'px';
panel.style.marginBottom = 10 + 'px';
if (panel) {
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
panel.style.marginBottom = 0 + 'px';
} else {
panel.style.maxHeight = panel.scrollHeight + 'px';
panel.style.marginBottom = 10 + 'px';
}
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/shared.js
< 10000 td class="blob-code blob-code-context js-file-line"> const listen_web3_1_changes = () => {
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $(document).ready(function() {
}
}

compiledSplitter = compiledSplitter0;
compiledSplitter = compiledSplitter0 ? compiledSplitter0 : null;

if (typeof web3 == 'undefined' || typeof web3.eth.getCoinbase() == 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ const process_activities = function(result, bounty_activities) {
extend_expiration: gettext('Extended Bounty Expiration')
};

const now = new Date(result['now']);
const now = result['now'] ? new Date(result['now']) : new Date();
const is_open = result['is_open'];
const _result = [];

Expand Down
2 changes: 2 additions & 0 deletions app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ var get_updated_metamask_conf_time_and_cost = function(gasPrice) {
usdAmount = Math.round(100 * eth_amount_unrounded * document.eth_usd_conv_rate) / 100;
}

if (typeof document.conf_time_spread == 'undefined') return;

for (var i = 0; i < document.conf_time_spread.length - 1; i++) {
var this_ele = (document.conf_time_spread[i]);
var next_ele = (document.conf_time_spread[i + 1]);
Expand Down
2 changes: 1 addition & 1 deletion app/grants/templates/grants/shared/shared_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

<script src="{% static "v2/js/lib/web3.min.js" %}"></script>
<script>
var web3 = new Web3(Web3.givenProvider || "ws://localhost:8546");
var web3 = Web3 ? new Web3(Web3.givenProvider || "ws://localhost:8546") : null;
</script>
0