You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies, I'm a JavaScript newbie but I have a couple of problems. These could be solved by code fixes or more detailed installation instructions when outside of a NodeJS environment. I'll describe my usage, fixes, and the error that caused me to get stuck.
smashgg-user.js makes use of the smashgg-promise objects and API.
Problem 1:
Lines 912-915 cause inclusion problems, commenting them out solves this issue. Uncaught ReferenceError: Match is not defined at smashgg-promise.js:912
After commenting out 912 and 913 Uncaught ReferenceError: module is not defined at smashgg-promise.js:915
Resolution comment out 912-915
Problem 2:
From the following code snippet:
var promise = smashgg.getTournament(TOURNAMENT_SLUG);
promise.then(function(t) {
console.log(t);
var promise2 = t.getAllMatches();
promise2.then(function (m) { // Error here
m.forEach(function (match) {
console.log(match);
});
});
});
The call to then on promise2 results in an uncaught error.
Uncaught (in promise) Error: Winner Player for Set cannot be null, and must be an instance of ggPlayer
at new Set (smashgg-promise.js:694)
at ThisPhaseGroup.findPlayersByIds.then.players (smashgg-promise.js:612)
Set @ smashgg-promise.js:694
ThisPhaseGroup.findPlayersByIds.then.players @ smashgg-promise.js:612
Promise.then (async)
(anonymous) @ smash-p1-record.js:79
Promise.then (async)
update_results @ smash-p1-record.js:76
reload_complete @ smash-p1-record.js:43
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
k @ jquery-3.3.1.min.js:2
(anonymous) @ jquery-3.3.1.min.js:2
load (async)
send @ jquery-3.3.1.min.js:2
ajax @ jquery-3.3.1.min.js:2
w.(anonymous function) @ jquery-3.3.1.min.js:2
getJSON @ jquery-3.3.1.min.js:2
reload @ smash-p1-record.js:24
main @ smash-p1-record.js:18
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2
It is here where I get stuck and cannot proceed. Could you please help?
The text was updated successfully, but these errors were encountered:
Apologies, I'm a JavaScript newbie but I have a couple of problems. These could be solved by code fixes or more detailed installation instructions when outside of a NodeJS environment. I'll describe my usage, fixes, and the error that caused me to get stuck.
Usage: file.xhtml
<script ... src="dist/smashgg-promise.js"></script> <script ... scr="smashgg-user.js"></script>smashgg-user.js makes use of the smashgg-promise objects and API.
Problem 1:
Lines 912-915 cause inclusion problems, commenting them out solves this issue.
Uncaught ReferenceError: Match is not defined at smashgg-promise.js:912
After commenting out 912 and 913
Uncaught ReferenceError: module is not defined at smashgg-promise.js:915
Resolution comment out 912-915
Problem 2:
From the following code snippet:
The call to then on promise2 results in an uncaught error.
It is here where I get stuck and cannot proceed. Could you please help?
The text was updated successfully, but these errors were encountered: