Commit 49640ebf authored by Jehan's avatar Jehan

plug-ins: fix warning on JavaScript goat exercise.

The exact warning was:
> (goat-exercise-gjs:26895): Gjs-WARNING **: 15:59:18.382: Some code
> called array.toString() on a Uint8Array instance. Previously this
> would have interpreted the bytes of the array as a string, but that is
> nonstandard. In the future this will return the bytes as
> comma-separated digits. For the time being, the old behavior has been
> preserved, but please fix your code anyway to explicitly call
> ByteArray.toString(array).  (Note that array.toString() may have been
> called implicitly.)
parent 183f00ba
Pipeline #113696 passed with stages
in 16 minutes and 42 seconds
......@@ -106,7 +106,7 @@ var Goat = GObject.registerClass({
box.pack_start(label, false, false, 1);
label.show();
let contents = String(GLib.file_get_contents(System.programInvocationName)[1]);
let contents = imports.byteArray.toString(GLib.file_get_contents(System.programInvocationName)[1]);
if (contents) {
let scrolled = new Gtk.ScrolledWindow();
scrolled.set_vexpand (true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment